doing multiple glideajax in loop inside a client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2022 01:02 PM
just came across a cataog client script where glideajax was being called inside a for loop.
made not much sense but is that ok ?
will it be executed more than once ?
for loop 1 to n {
..new glideajax....
var result = ga.getXMLAnswer(helloworld);
}
- Labels:
-
Analytics and Reports
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2022 01:07 PM
Hi, I would expect that it will execute for each loop, but without any details\context it's not possible to understand whats going on and why.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2022 01:10 PM
Hi,
That seems very inefficient. Every GlideAjax is a call to the server, and returns an answer back to the client.
It would be much better if only one call is made, and all the needed data is fetched at once.