views:

284

answers:

1

I cannot find how can I attach an timeout option to the Ajax prototype call or what is the default value for it.

+1  A: 

There doesn't seem to be specific timeout functionality in Prototype yet. It seems to be definitely in the works, see Prototype Ticket #220. I'm guessing it is using whatever browser-wide global timeout there is for XMLHTTPRequests.

Maybe this helps: AJAX Timeouts with Prototype

It's a few years old already, but may still do the trick.

JQuery seems to have this built in.

Pekka
I know about jQuery, but I am using Magento and is prototype based...
Elzo Valugi
I added a link to a Prototype ticket. One person has a fork there that seems to implement timeouts.
Pekka
thanks a bunch.
Elzo Valugi
the global value is 0, meaning it will go on until will reach network stack's time-out value. src: http://msdn.microsoft.com/en-us/library/cc304105(VS.85).aspx
Elzo Valugi
Good to know, thanks!
Pekka