dojo.io.iframe._fireNextRequest
dojo.require("dojo.io.iframe");
defined in dojo/io/iframe.js
Internal method used to fire the next request in the bind queue.
Usage
function () (view source)
try{ if((this._currentDfd)||(this._dfdQueue.length == 0)){ return; } var dfd = this._currentDfd = this._dfdQueue.shift(); var ioArgs = dfd.ioArgs; var args = ioArgs.args; ioArgs._contentToClean = []; var fn = dojo.byId(args["form"]); var content = args["content"] || {}; if(fn){ if(content){ // if we have things in content, we need to add them to the form // before submission for(var x in content){ if(!fn[x]){ var tn; if(dojo.isIE){ tn = dojo.doc.createElement("<input type='hidden' name='"+x+"'>"); }else{ tn = dojo.doc.createElement("input"); tn.type = "hidden"; tn.name = x; } tn.value = content[x]; fn.appendChild(tn); ioArgs._contentToClean.push(x); }else{ fn[x].value = content[x]; } } } //IE requires going through getAttributeNode instead of just getAttribute in some form cases, //so use it for all. See #2844 var actnNode = fn.getAttributeNode("action"); var mthdNode = fn.getAttributeNode("method"); var trgtNode = fn.getAttributeNode("target"); if(args["url"]){ ioArgs._originalAction = actnNode ? actnNode.value : null; if(actnNode){ actnNode.value = args.url; }else{ fn.setAttribute("action",args.url); } } if(!mthdNode || !mthdNode.value){ if(mthdNode){ mthdNode.value= (args["method"]) ? args["method"] : "post"; }else{ fn.setAttribute("method", (args["method"]) ? args["method"] : "post"); } } ioArgs._originalTarget = trgtNode ? trgtNode.value: null; if(trgtNode){ trgtNode.value = this._iframeName; }else{ fn.setAttribute("target", this._iframeName); } fn.target = this._iframeName; fn.submit(); }else{ // otherwise we post a GET string by changing URL location for the // iframe var tmpUrl = args.url + (args.url.indexOf("?") > -1 ? "&" : "?") + ioArgs.query; this.setSrc(this._frame, tmpUrl, true); } }catch(e){ dfd.errback(e); }