multiple event handlers for an element in JavaScript