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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi, I work with Netscape 4.6

Status
Not open for further replies.

aleahim

Programmer
Jun 3, 2002
22
0
0
RO
Hi,

I work with Netscape 4.6

How can I call a function from one frame to another?
The following script executes only the mid() function. If I don't write <body onLoad=&quot;mid();&quot; > it won't work.
Do you think it't normal?
Why the second function doesn't execute it?

<frameset cols=&quot;70%,*&quot;
<frame src=&quot;page1.html&quot; name=&quot;frame1&quot;>
<frame src=&quot;page2.html&quot; name=&quot;frame2&quot;>
</frameset>

Page1:
<head>
function mid() {
parent.frame2.document.bgColor=&quot;red&quot;;
}
function sed() {
parent.frame2.testing();
}
</head>
<body onLoad=&quot;mid();sed();&quot;>
</body>

Page2:
<html>
<head>
<script language=&quot;JavaScript&quot;>
function testing() {
var x=&quot;this is page1&quot;;
alert(x);
}
</script>
</head>
<body></body>
</html>


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top