I'm trying to use a script-generated form to submit to a
script-generated iframe. The problem I'm running into is that the
iframe is not assuming the name I assign it.
IE6 on Win2000. FF1.0.2+ doesn't seem to have the problem.
I'm doing:
this.iframe = document.createElement( 'iframe' );
this.iframe.id = this.id + 'wh';
this.iframe.style.display = 'none';
this.iframe.name = this.iframe.id; // <---
// snippage, including generation of the form
this.form.target = this.iframe.name;
this.form.appendChild( this.iframe );
However, when I submit the form it opens in a new window.
When I alert( document.body.innerHTML ), I am being told:
<IFRAME id=dr436929wh></IFRAME>
[sic]
i.e. no "name" attribute (hence the new window).
What I've already tried:
* Setting the iframe.name attribute only after
this.form.appendChild( this.iframe )
* Using this.iframe.setAttribute( name, ... ) prior to and after the
appendChild
* Setting this.form.target = this.iframe (just for the hell of it)
Thanks in advance. I know you guys are good. Let me know if you need
more info.