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

Q1171 Is there a way for an image on one window to become visible when a link is clicked on a different window?

You are here: irt.org | FAQ | JavaScript | Image | Q1171 [ previous next ]

In frameB:

<img name="myImage" src="blank.gif" width="100" height="100">

In frameA:

<script language="JavaScript"><!--
if (document.images) {
    img1 = new Image(); img1.src = "visible.gif";
}

function show() {
    if (document.images)
        parent.frameB.document.myImage.src = img1.src;
}
//--></script>

<a href="somewhere.htm" onClick="show()">text link</a>

©2018 Martin Webb