Ticket #2844: dojo.io.IFrameIO_20070724.patch
| File dojo.io.IFrameIO_20070724.patch, 1.5 kB (added by jaredj, 18 months ago) |
|---|
-
src/io/IframeIO.js
106 106 } 107 107 } 108 108 } 109 //IE requires going through getAttributeNode instead of just getAttribute in some form cases, 110 //so use it for all. See #2844 111 var actnNode = fn.getAttributeNode("action"); 112 var mthdNode = fn.getAttributeNode("method"); 113 var trgtNode = fn.getAttributeNode("target"); 109 114 if(cr["url"]){ 110 cr._originalAction = dojo.io._getAttribute(fn, "action"); 111 fn.setAttribute("action", cr.url); 115 cr._originalAction = actnNode ? actnNode.value : null; 116 if(actnNode){ 117 actnNode.value = cr.url; 118 }else{ 119 fn.setAttribute("action", cr.url); 120 } 112 121 } 113 if(!dojo.io._getAttribute(fn, "method")){ 114 fn.setAttribute("method", (cr["method"]) ? cr["method"] : "post"); 122 if(!mthdNode || !mthdNode.value){ 123 if(mthdNode){ 124 mthdNode.value = (cr["method"]) ? cr["method"] : "post"; 125 }else{ 126 fn.setAttribute("method", (cr["method"]) ? cr["method"] : "post"); 127 } 115 128 } 116 cr._originalTarget = fn.getAttribute("target"); 117 fn.setAttribute("target", this.iframeName); 129 cr._originalTarget = trgtNode ? trgtNode.value : null; 130 if(trgtNode){ 131 trgtNode.value = this.iframeName; 132 }else{ 133 fn.setAttribute("target", this.iframeName); 134 } 118 135 fn.target = this.iframeName; 119 136 fn.submit(); 120 137 }else{