There are several pre-defined JavaScript exits which are described on subsequent pages in this guide. In addition, you can create your own JavaScript methods which you can attach and call to any of the fields on the form, using a JavaScript event to trigger the entry to your own method.
There are two steps to creating your own JavaScript method. First, you create a link from the field on the form to your JavaScript method. Secondly, you create the JavaScript method within the UserJavaScript.js file on the server.
onchange=user_fn(paramList);
This will call the function in the JavaScript file named user_fn on the server for operations such as validation, or altering the required or visibility attribute of fields. You can use any other JavaScript event such as onclick, onfocus, onkeyup, or onmouseover to trigger the call to the JavaScript.
function validateUPS(val) { alert("Value passed is: " + val[val.selectedIndex].text); return; }