Using jslog()

The jslog() global function can be used in any client-side script. The output of the jslog() method is in the JavaScript Log window and visible only to users with the admin role.

As shown in the following screenshot, open the Hide return date field on load client script we created earlier in this book in Studio:

Now replace the code in the Script field with the following code:

function onLoad() { 
   //hide return date if return checkbox is not checked 
if ( ! g_form.getBooleanValue("u_is_return")) { 
  jslog("Hiding return date field. Return checkbox is: " + g_form.getBooleanValue("u_is_return") ); 
  g_form.setDisplay("u_return_date",false); 
   } 
} 

Now with the JavaScript Log window active, switch to the Booking Request form in the employee view by opening the Travel Booking Application | Create new module. As shown in the following screenshot, you will notice a log entry created in the JavaScript Log window by the jslog() global function we just added in the client script:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.220.16.184