correct js for create event