create js files for event, register