We have a number of servlet-based applications. One general problem is that if the servlet container is down, the users get an error and nothing else. My idea was to write a page that we could interpose between the servlet app and the user. The page would check on the availability of the app, and if it was down, offer some static information that might be helpful. My first attempt used dojo.xhr("HEAD", ...) (setting the load function to assign the URL I was checking to document.location) and didn't work because the servlet container is on a different port.
dojo.io.script
load function is not working for dojo.io.script.get
Submitted by schen on Sat, 03/29/2008 - 19:14.
The following code gave "dojo.io has no properties" error:
<head>
<script
type="text/javascript"
src="http://o.aolcdn.com/dojo/1.0.0/dojo/dojo.xd.js"
djConfig="isDebug:true">
</script>
<script type="text/javascript">
var onDojoLoad = function() {
dojo.require("dojo.io.script");
dojo.io.script.get({
url:"my_message.js",
load: function() {alert("loaded");},
error: function() {alert("error");}
})
}
dojo.addOnLoad(onDojoLoad);
</script>
</head>
<body>
This is a test.
</body>
<script
type="text/javascript"
src="http://o.aolcdn.com/dojo/1.0.0/dojo/dojo.xd.js"
djConfig="isDebug:true">
</script>
<script type="text/javascript">
var onDojoLoad = function() {
dojo.require("dojo.io.script");
dojo.io.script.get({
url:"my_message.js",
load: function() {alert("loaded");},
error: function() {alert("error");}
})
}
dojo.addOnLoad(onDojoLoad);
</script>
</head>
<body>
This is a test.
</body>
All calls to dojo.io.script.get() "time out" after one has really timed out.
Submitted by Panther on Tue, 03/18/2008 - 16:12.
Hi all,
i'm developing a web application which uses dojo.io.script.get().
I experience that after on of the calls to dojo.io.script.get() has timed out (in this case the server wasn't responding) all subsequent calls to dojo.io.script.get() also time out (even it Firebug->Net shows that the server sends an correct response to the http-request).
Correct response (which i find in firebug->Net) is something like:
var data = {"errorCode":0,"Foo":"0"};
dojo.io.script.jsonp_dojoIoScript2._jsonpCallback(data);
dojo.io.script.jsonp_dojoIoScript2._jsonpCallback(data);
For testing issues i changed the response to something like:
