Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

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?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.