Example of JavaScript Structure
The following example checks to see whether the End Time is greater than the Start Time.
This example demonstrates what was explained in the previous sections, to analyze the structure of JavaScript queries. In addition, this example references a Java Script library (JSLib.js).
<html><head><title>Example</title> <script type="text/javascript" src="SwiftMEAP/JSLib.js"></script> <script type="text/javascript"> function fieldsOnPreSave(){ return "this.CUSTDT01,this.CUSTDT02"; } function onPreSave(starttime, endtime){ if( endtime > starttime ){ return true; }else{ window.location = "melt://showAlert/End Date must be greater than Start Date"); return false; } }</script></head><body></Body></html>