[thelist] targeting an iframe with a form
Hans-Fr=?ISO-8859-1?B?6WTp?=ric Fraser
hfraser at videotron.ca
Sun Jan 12 00:29:21 CST 2003
On 1/11/03 4:29 PM, "Kelly Hallman" <khallman at wrack.org> wrote:
> Does this work?
> <form action="x.cgi" method="post" target="iframe"></form>
>
>
> On Sat, 11 Jan 2003, Hans-Frédéric Fraser wrote:
nope but i did this and that works
myNewWindow.document.forms[0].target = 'myFrame';
see the window is created from scatch and takes it's html from a div with a
display:none
and innerHTML (dont ask me why) does not take the attribute target and
removes it entirely!
here is an example of what i am doing
<span id="myForm">
<form name="editFold" target="favFrame" method="get" action="fav.php">
some elements ...
</form>
</span>
alert(document.getElementById(myForm).innerHTML);
the output is!
<form name="editFold" method="get" action="fav.php">
some elements ...
</form>
as you can see the target attribute is removed!
after setting the body of my window to:
myNewWindow.document.body.innerHTML =
document.getElementById(myForm).innerHTML;
i do!
myNewWindow.document.forms[0].target = 'myFrame';
and that works no problem !
now my problem is getting the window to close as soon as i submit the
document!
More information about the thelist
mailing list