Index: core/impl/main/java/org/directwebremoting/engine.js
===================================================================
--- core/impl/main/java/org/directwebremoting/engine.js (revision 2626)
+++ core/impl/main/java/org/directwebremoting/engine.js (working copy)
@@ -1460,9 +1460,19 @@
}
var idname = dwr.engine.transport.iframe.getId(batch);
batch.div = document.createElement("div");
- // Add the div to the document first, otherwise IE 6 will ignore onload handler.
- document.body.appendChild(batch.div);
- batch.div.innerHTML = "";
+ if (dwr.engine.isIE) {
+ document.body.appendChild(batch.div);
+ batch.div.innerHTML = "";
+ batch.iframe = batch.div.firstChild;
+ } else {
+ batch.iframe = document.createElement("iframe");
+ batch.iframe.setAttribute("id", idname);
+ batch.iframe.setAttribute("name", idname);
+ batch.iframe.setAttribute("frameborder", "0");
+ batch.iframe.setAttribute("src", "about:blank");
+ batch.iframe.setAttribute("onload", "dwr.engine.transport.iframe.loadingComplete(" + batch.map.batchId + ");");
+ document.body.appendChild(batch.iframe);
+ }
batch.document = document;
dwr.engine.transport.iframe.beginLoader(batch, idname);
},
@@ -1482,7 +1492,6 @@
* @param {Object} batch
*/
beginLoader:function(batch, idname) {
- batch.iframe = batch.document.getElementById(idname);
batch.iframe.batch = batch;
batch.mode = batch.isPoll ? dwr.engine._ModeHtmlPoll : dwr.engine._ModeHtmlCall;
if (batch.isPoll) dwr.engine._outstandingIFrames.push(batch.iframe);