simplyfing the js_notify method