Using synchronous GlideAjax in on submit client script for Service Portal

Ravish Shetty
Tera Guru

hi all,

 

I have a use case to call a script include on submit of a client script and wait for the execution to complete.

 

my understanding is that synchronous GlideAjax does not work when the catalog is opened in Service Portal. How do we go about this?

 

Thanks,

Ravish

6 REPLIES 6

John VanBruggen
Giga Guru

I just ran into the exact same situation and the work around that I devised was to create a checkbox that has an onChange script that does all the form validation up front.  The checkbox is required and it self-unchecks if validaiton fails.  Thus, form submission cannot occur unless all validation is complete.

Essentially, you perform much of the same logic that you would have intended to do in the onSubmit script.

Here is a quick demo of my solution to this delemna.

Check out my Consultant's Survival Guide
https://youtube.com/watch?v=zYi8KhP9SUk

Very helpful and nice piece of information John. Thank you very much!!