• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Browser white screen with Ajax call

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using Ajax in JS to make an simple Struts call to a WebSphere application server to save a small amount of data to a database. In our development environments everything worked fine. However, we are receiving reports from users that even over fast broad band connections, they are seeing white/locked up screens in IE that lock up when making this call. I am able to recreate the white screen in both IE and Firefox in my IDE by putting alert messages in the JS and breakpoints in the Stuts action code but when I release the alert/breakpoint the screen renders OK.

We have considered refreshing the whole page to solve the problem.

Any other ideas you may have to solve this problem would be welcomed.

Thanks!
Bill
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And what is the code you are using to make the Ajax call?

Eric
 
Bill Rowell
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The call is being made in JavaScript.
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Bill Rowell:
The call is being made in JavaScript.



I sort of figured that out! What is the actual code that you are using that is causing this issue. Are you using a framework? Are you doing this with the asyn flag set to true or false.

Eric
 
Bill Rowell
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Below is the code we are using to set up the XMLHttPRequest object.
Looking at the results of the alert messages (shown below) I verified that
this.bAsync = false and this.bInDebug = true.
Bill

function XmlRequestProcessor(path, qString, method, async, inDebug) {
alert("path = " + path + ",qString= " + qString + ",method= " + method + ",async= " + async + ",inDebug= " + inDebug);
//Properties
var self = this;
this.oParent = null;
this.oXmlHttpReq = null;
this.sPath = path;
this.sQuery = (!qString)?"":qString;
this.sMethod = (!method || method == "")?"POST":method.toUpperCase();
this.bAsync = async = (typeof async == 'undefined' || async == null)?true:async;
this.bInDebug = inDebug = (typeof inDebug == 'undefined' || inDebug == null)?false:inDebug;
alert("sPath = " + this.sPath + ",sQuery= " + this.sQuery + ",sMethod= " + this.sMethod +
",bAsync= " + this.bAsync + ",bInDebug= " + this.bInDebug);

//methods
this.process = null;
if (window.XMLHttpRequest) {
this.getXmlHttpReqObj = ns_xmlReq_getXmlHttpReqObj;
} else if (window.ActiveXObject) {
this.getXmlHttpReqObj = ie_xmlReq_getXmlHttpReqObj;
}
this.transmitData = ldc_xmlReq_transmitData;
this.appendText = ldc_xmlReq_appendText;
this.appendHtml = ldc_xmlReq_appendHtml;
this.useInnerHtml = ldc_xmlReq_useInnerHtml;
this.applyProcess = ldc_xmlReq_applyProcess;
this.processText = ldc_xmlReq_processText;
this.processHtml = ldc_xmlReq_processHtml;
this.processInnerHtml = ldc_xmlReq_processInnerHtml;
this.createHtmlNode = ldc_xmlReq_createHtmlNode;
this.exeProcess = ldc_xmlReq_executeProcess;
this.copyAttributes = ldc_xmlReq_copyAttributes;

//calls
//Seperated out to support the diff between IE and Mozilla
self.oXmlHttpReq = this.getXmlHttpReqObj();
self.oXmlHttpReq.onreadystatechange = function( ) {
self.exeProcess(self.oXmlHttpReq);
}
self.oXmlHttpReq.open(this.sMethod, this.sPath, this.bAsync);

if (self.sMethod == "POST") {
self.oXmlHttpReq.setRequestHeader("Connection", "close");
self.oXmlHttpReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
self.oXmlHttpReq.setRequestHeader("Method", "POST " + self.sPath + "HTTP/1.1");
}
}
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic