Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Firefox Get value from another frame. 1

Status
Not open for further replies.

mattdrinks

Technical User
Oct 2, 2002
43
0
0
GB
I have the following (simplified) HTML.

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>

<script language="JavaScript" type="text/javascript">

</script>
</head>

<frameset rows="15%,85%">

<frame name="fraTopNav" src="about:blank">

<frameset cols="17%,83%">

<frameset rows="87%,13%">

<frame name="fraSideNav" src="/MattTest.nsf/SideNav?OpenPage">

<frame name="fraFamilyID" src="/MattTest.nsf/FamilyID?OpenForm" id="fraFamilyID">
</frameset>

<frameset rows="32%,44%">

<frame name="fraNewPerson" src="about:blank">

<frame name="fraExistingPeople" src="about:blank">
</frameset>
</frameset>
</frameset>
</html>

In the frame fraNewPerson I have a form and then the following code run on a button click event:
Code:
if (confirm("Are you sure you wish to submit?"))
{
	top.fraFamilyID._FamilyID.TEMPFamilyID.value = "TEST";
	window.document.forms[0].submit()
}

This works fine in IE and Opera but in Firefox and Netscape it fails when trying to set the value of the textbox that is on the other frame.
Error message generated : top.fraFamilyID._FamilyID has no properties.

Does anyone have any ideas, it is probably something simple I have missed, but any help would be really appreciated.

Thanks

Matt
 
>[tt]top.fraFamilyID._FamilyID.TEMPFamilyID.value = "TEST";[/tt]
[tt]top.fraFamilyID.[red]document.[/red]_FamilyID.TEMPFamilyID.value = "TEST";[/tt]

 
Thank you so much.

I had tried all different variations for different browsers and managed to get myself into an awful mess.
You solution works for all the browsers I need it to.
(IE 6.0, Opera, Firefox 1.5, and Netscape)

Thanks again

Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top