Notifications

32 views

Description

The GlideAjax (Asynchronous) does not work on onSubmit Client Script. This is because of the fundamental behavior of Asynchronous scripts which are non-blocking by nature.

Release or Environment

All Versions

Instructions

To mitigate this fundamental behavior, the form should be submitted again and this should be handled in the callback function of the getXML.


function onSubmit() {
if (g_scratchpad.isFormValid){
	return true;
}
var actionName = g_form.getActionName();
var ga = new GlideAjax("SOMEFUNCTION");
ga.addParam(.....);
ga.getXML(function() {
	g_scratchpad.isFormValid = true;
	g_form.submit(actionName);
});
	return false;
}
 

Article Information

Last Updated:2019-10-30 08:55:22
Published:2019-10-30