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

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?

You are here: irt.org | FAQ | JavaScript | Window | Q207 [ previous next ]

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

©2018 Martin Webb