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

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

irt.org | Knowledge Base | JavaScript | Image | Q1171 [ previous next ]

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

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>

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.