|
Q53 How do I call a function in another frame?
irt.org | Knowledge Base | JavaScript | Frame | Q53 [ previous next ]
Q53 How do I call a function in another frame?
Try:
<frameset col"50%,*">
<frame src="page1.htm">
<frame src="page2.htm" name="otherFrameName">
</frameset>
|
Then in page1.htm:
<script language="JavaScript"><!--
parent.otherFrameName.functionName();
//--></script>
|
Then in page2.htm:
<script language="JavaScript"><!--
function functionName() {
alert('Hello world');
}
//--></script>
|
Feedback on 'Q53 How do I call a function in another frame?'
|
|
Copyright © 1996-2008 irt.org, All Rights Reserved.