Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within HTML Pages with CSS and JavaScript
Search Coderanch
Advance search
Google search
Register / Login
Win a copy of
Eclipse Collections Categorically: Level up your programming game
this week in the
Open Source Projects
forum!
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Ron McLeod
Jeanne Boyarsky
Sheriffs:
Paul Clapham
Saloon Keepers:
Tim Holloway
Roland Mueller
Bartenders:
Forum:
HTML Pages with CSS and JavaScript
AJAX Call timout: code: 12002
Prakas Subed
Greenhorn
Posts: 20
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
AJAX call fails and we receive http code 12002; even when session timeout is set to 0 on web.xml on following code:
We receive the the error inconsistently. i.e. somtimes within 20 minutes of accessing the
JSP
; sometimes 10 minutes.
We have code similar to following (part of a JSP); appreciate any pointers:
<script> var req; var which; var strContentText; var bottomView = null; function retrieveURL(url) { if (window.XMLHttpRequest) { // Non-IE browsers req = new XMLHttpRequest(); req.onreadystatechange = processStateChange; try { req.open("GET", url, true); } catch (e) { alert(e); } req.send(null); } else if (window.ActiveXObject) { // IE req = new ActiveXObject("Microsoft.XMLHTTP"); if (req) { req.onreadystatechange = processStateChange; req.open("GET", url, true); req.send(); } } } function processStateChange() { if (req.readyState == 4) { // Complete if (req.status == 200) { // OK response var timerId = null; document.getElementById("theTable").innerHTML = req.responseText; timerId = self.setTimeout('retrieveURL(\'\<%= request.getContextPath() %>\/panes\/panesDataBrowse.do\')', 1000); } else { alert("There has been problem getting updated information for this screen: \n" + req.statusText + "Status: " + req.status ); } } }
Eric Pascarello
author
Posts: 15385
6
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Most people normally will have a setTimeout that is fired with an Ajax Request. If it is left open for X amount of time and it normally takes Y amount of time, then they cancel it with the abort9) method.
Eric
Prakas Subed
Greenhorn
Posts: 20
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I can get the Y; that's 1000 ms as set on above code. Any pointers on how to get/set X?
Thanks,
An elephant? An actual elephant. Into the apartment. How is the floor still here. Hold this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Ajax Error
AJAX requests on page reload
AJAX+STRUTS
Recursive call to a JavaScript method with AJAX call
AJAX call works in ie6 but not in firefox
More...