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

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

irt.org | Knowledge Base | JavaScript | Link | Q927 [ previous next ]

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

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?'


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.