add js eventhandler