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

Q207 How can I put a message in the status window when the mouse is over a link, but after a certain length of time change the message to display the URL specified in the link?

irt.org | Knowledge Base | JavaScript | Window | Q207 [ previous next ]

Q207 How can I put a message in the status window when the mouse is over a link, but after a certain length of time change the message to display the URL specified in the link?

<script language="JavaScript"><!--
var timer = '';

function url(url) {
    window.status = url;
}

function over(text,url) {
    window.status = text;
    timer = setTimeout('url("' + url + '")',1000);
    return true;
}

function out() {
    window.status = '';
    clearTimeout(timer);
    return true;
}
//--></script>

<a href="apage.html"
   onMouseOver="return over('some status text',this.href)"
   onMouseOut="return out()"
>some link text</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.