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

Q927 Can I incorporate both an open window function and a rollover function within the same image link?

You are here: irt.org | FAQ | JavaScript | Link | Q927 [ previous next ]

Yes, try:

<script language="JavaScript"><!--
function rollover(name,image) {
    if (document.images)
        document.images[name].src = image;
}

var windowHandle = null;

function openWin() {
    windowHandle = window.open(url,'windowName','width=200,height=200');
}
//--></script>


<a href="#" onMouseOver="rollover('myPicture','other.gif')" onMouseOut="rollout('myPicture','picture.gif')" onClick="this.href='javascript:openWin()'"><img src="picture.gif" name="myPicture" width="50" height="50" alt="My picture"></a>

Feedback on 'Q927 Can I incorporate both an open window function and a rollover function within the same image link?'

©2018 Martin Webb