Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

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?

You are here: irt.org | FAQ | JavaScript | Frame | Q844 [ previous next ]

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">

©2018 Martin Webb