Audrius wrote:
Hello,
I have to iframes within one page. When I triger action in one frame, I
need to update the content's of other frame's selection list.
How to access second frame's form element from my first frame in index
page?
Suppose I named my second frame "content", and form element is named
simply "form1". If I try to access that form by refering:
parent.content.document.form1, I get nothing at all.
Can anyone help me with that...
Thank you,
Audrius
Hi,
Try something like this. (Not tested)
suppose you have 2 pages (page2 as Iframe named myIFrame)
page1.html
<html>
...etc
<form name="page1form" action=".." method="POST">
<input type="text" name="firstname">
</form>
</html>
page2.html
<html>
...etc
<form name="page2form" action=".." method="POST">
<input type="button" value="change page 1" onClick="doit();">
</form>
<script type="text/javascipt">
function doit(){
parent.frames.myIFrame.document.forms.page1form.fi rstname.value="Joe";
}
</script>
</html>
Regards,
Erwin Moller