Index: engine.js =================================================================== --- engine.js (revision 2622) +++ engine.js (working copy) @@ -1460,9 +1460,21 @@ } var idname = dwr.engine.transport.iframe.getId(batch); batch.div = document.createElement("div"); + if (!dwr.engine.isIE) { + batch.iframe = document.createElement("iframe"); + batch.iframe.setAttribute("id", idname); + batch.iframe.setAttribute("name", idname); + batch.iframe.setAttribute("frameborder", "0"); + batch.iframe.src = "javascript:void(0)"; + batch.iframe.onload = "dwr.engine.transport.iframe.loadingComplete(" + batch.map.batchId + ");"; + batch.div.appendChild(batch.iframe); + } // 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) { + batch.div.innerHTML = ""; + batch.iframe = batch.div.firstChild; + } batch.document = document; dwr.engine.transport.iframe.beginLoader(batch, idname); }, @@ -1482,7 +1494,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); @@ -1502,8 +1513,8 @@ batch.form = div.firstChild; for (var prop in batch.map) { var value = batch.map[prop]; - if (value && typeof value != "function") { - if (value.tagName && value.tagName.toLowerCase() == "input" && value.type && value.type.toLowerCase() == "file") { + if (typeof value != "function") { + if (value && value.tagName && value.tagName.toLowerCase() == "input" && value.type && value.type.toLowerCase() == "file") { // Since we can not set the value of a file object, we must post the actual file object // that the user clicked browse on. We will put a clone in it's place. var clone = value.cloneNode(true); @@ -1513,10 +1524,10 @@ value.parentNode.removeChild(value); batch.form.appendChild(value); } else { - var formInput = batch.document.createElement("input"); + var formInput = batch.document.createElement("input"); formInput.setAttribute("type", "hidden"); formInput.setAttribute("name", prop); - formInput.setAttribute("value", value); + formInput.setAttribute("value", value == null ? "" : value); batch.form.appendChild(formInput); } }