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="mid();" > it won't work.
Do you think it't normal?
Why the second function doesn't execute it?
<frameset cols="70%,*"
<frame src="page1.html" name="frame1">
<frame src="page2.html" name="frame2">
</frameset>
Page1:
<head>
function mid() {
parent.frame2.document.bgColor="red";
}
function sed() {
parent.frame2.testing();
}
</head>
<body onLoad="mid();sed();">
</body>
Page2:
<html>
<head>
<script language="JavaScript">
function testing() {
var x="this is page1";
alert(x);
}
</script>
</head>
<body></body>
</html>
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="mid();" > it won't work.
Do you think it't normal?
Why the second function doesn't execute it?
<frameset cols="70%,*"
<frame src="page1.html" name="frame1">
<frame src="page2.html" name="frame2">
</frameset>
Page1:
<head>
function mid() {
parent.frame2.document.bgColor="red";
}
function sed() {
parent.frame2.testing();
}
</head>
<body onLoad="mid();sed();">
</body>
Page2:
<html>
<head>
<script language="JavaScript">
function testing() {
var x="this is page1";
alert(x);
}
</script>
</head>
<body></body>
</html>