If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

IE + Iframe popup problem

Hello Everyone,

I was stuck with this really frustrating problem for sometime. Let me
explain what I am trying to achieve: There is a form and an inner
iframe. The form's target is set to the iframe so that when the form
is submitted, the page does not get reloaded/changed ( as the iframe
would be the one getting refreshed. The Iframe is set to have 0 width
and height to make it look invisible ).

The problem is when you use document.createElement(...), IE dose not set the name attribute for the created element, even if you use:
elm.setAttribute('name', 'somename');
or
elm.name = 'somename';
so, you can use the following fashion:
var newDiv = document.createElement('div');
newDiv.innerHTML += '<iframe name="form_'+uniqueId+'_iframe" ... />';