20
rated 0 times
[
22]
[
2]
/ answers: 1 / hits: 31786
/ 15 Years ago, tue, february 2, 2010, 12:00:00
I was trying to create an iframe element using javascript, like so:
var iframe = document.createElement('iframe');
iframe.setAttribute('name', 'frame_x');
However, when I tried submitting a form using the newly-created iframe as target, IE opens up a new window, instead of using the iframe.
form.setAttribute('target', 'frame_x');
form.submit();
This works perfectly in Firefox. Also, the iframe gets created, but is not used.
More From » forms