WebmasterLULZ
09-30-2010, 07:16 AM
So I have the following code in javascript that creates an iframe:
var iframe = document.createElement("iframe");
iframe.id = 'offerframe';
iframe.name = 'offerframe';
iframe.width = '975';
iframe.height = '650';
iframe.align = 'center';
iframe.src = 'http://example.com';
document.getElementById("offer-frame-div").appendChild(iframe);
It works fine in Firefox and Safari but in IE8 it generates the iframe name attribute to "submitName"
<iframe width="975" height="650" align="center" id="offerframe" submitName="offerframe" src="http://example.com">
Notice how it sets all the other attributes fine, however the name attribute is now called "submitName". This issue only happens in IE. This there any alternatives to setting my iframe name dynamically with javascript.
var iframe = document.createElement("iframe");
iframe.id = 'offerframe';
iframe.name = 'offerframe';
iframe.width = '975';
iframe.height = '650';
iframe.align = 'center';
iframe.src = 'http://example.com';
document.getElementById("offer-frame-div").appendChild(iframe);
It works fine in Firefox and Safari but in IE8 it generates the iframe name attribute to "submitName"
<iframe width="975" height="650" align="center" id="offerframe" submitName="offerframe" src="http://example.com">
Notice how it sets all the other attributes fine, however the name attribute is now called "submitName". This issue only happens in IE. This there any alternatives to setting my iframe name dynamically with javascript.