Event Handling
NetSuite already invokes JavaScript via their native "FieldSource" and "PostSource" event functions in the script definition. Unfortunately, other event handlers like onclick, onmouseover, onmouseout are not available and thus require some custom code. In the following snippet, I have provided a solution to add Event Listeners to a Suitelet via a client side script. In this example, the Suitelet page will load a button, to activate the event listeners when it is clicked.