added event generation in js for myevents