doing multiple glideajax in loop inside a client script

marcn
Tera Expert

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);

}

2 REPLIES 2

Tony Chatfield1
Kilo Patron

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.

OlaN
Giga Sage
Giga Sage

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.