GlideAjax (async)
Call server-side Script Includes from the browser without freezing the form.
GlideAjax is how a client script asks the server a question, 'what is this user's manager?', 'is this value unique?', and gets an answer asynchronously, without blocking the browser. It is the correct, performant alternative to synchronous lookups that freeze the form.
- Two halves
- Why it matters
- Try it Yourself
GlideAjax is how a client script asks the server a question, 'what is this user's manager?', 'is this value unique?', and gets an answer asynchronously, without blocking the browser. It is the correct, performant alternative to synchronous lookups that freeze the form.
Two halves
You write a client-callable Script Include (extending AbstractAjaxProcessor) and call it from the client with GlideAjax.
getXMLAnswer (or getXML) with a callback. The synchronous variants (getXMLWait) block the browser and are strongly discouraged, they are the classic cause of 'the form hangs' complaints.Why it matters
GlideAjax keeps forms responsive while still reaching real server data and logic. Combined with a well-factored Script Include, the same server method serves client scripts, business rules and widgets.
▸ Press Run to execute.
Runs in a sandbox in your browser. Mock gs and GlideRecord and sample data are provided.