UI Page not running processing script

grosch
Mega Expert

In my UI Page I've stuck this line to create the ok and cancel buttons:

<g:dialog_buttons_ok_cancel ok="return makeChanges()" ok_type="button" cancel_type="button" />

I then have this in the client script window:

function makeChanges() {

      var service = gel("service").value;

      if (!service) {

              alert("Please select a service to update.");

              return false;

      }

      GlideDialogWindow.get().destroy(); //Close the dialog window

      return true;

}

When I hit OK, the window just goes away.   The code that I have in the Processing script never runs.   Is it because I listed an "ok" callback?   Basically I need to make sure the input is OK and then if it is do the work server side.

16 REPLIES 16

Any ideas?


manikorada
ServiceNow Employee
ServiceNow Employee

Scott,



Is the issue that the code in Processing Script never runs or the script in Client Script never runs


The client script runs, but then the processing script does not.


manikorada
ServiceNow Employee
ServiceNow Employee

Scott,



I would suggest to do the scripting in Client script by calling Server side script using GlideAjax and see if it works.


Same problem !!


Either client script or processing script runs !!


How did you fix this issue?