added javascript to new event page