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

Q844 How do I set a variable in frame0 of a frameset, read that variable from frame1 of the same frameset, and automatically trigger an image swap in frame2 based on the value of the variable?

irt.org | Knowledge Base | JavaScript | Frame | Q844 [ previous next ]

Q844 How do I set a variable in frame0 of a frameset, read that variable from frame1 of the same frameset, and automatically trigger an image swap in frame2 based on the value of the variable?

In frames[0]:

<SCRIPT LANGUAGE="JavaScript"><!--
var myVar = 'image.gif';
//--></SCRIPT>

In frames[1]:

<IMG SRC="picture.gif" WIDTH="100" HEIGHT="100" onLoad="this.src=parent.frames[0].myVar">

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.