Article ID: 185532
Article Last Modified on 5/11/2006
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
function showStatus(text)
{
window.setTimeout("window.status='" + text + "'", 1);
}
</SCRIPT>
</HEAD>
<BODY>
<A HREF="http://www.microsoft.com#somewhere">Link 1</A>
<A HREF="http://www.microsoft.com#somewhere"
onmouseover="showStatus('#somewhere')"
onmouseout="window.status=''">
Link 2</A>
</BODY>
</HTML>
-or-
<HTML>
<HEAD>
<SCRIPT>
function showStatus(text)
{
window.event.returnValue = true;
window.status = text;
}
</SCRIPT>
</HEAD>
<BODY>
<A HREF="http://www.microsoft.com#somewhere">Link 1</A>
<A HREF="http://www.microsoft.com"
onmouseover="showStatus('hello1');"
onmouseout="showStatus('');">
Link 2</A>
</BODY>
</HTML>
When you move the mouse over the "Link1" text, the status bar shows the following URL:
http://example.microsoft.com#somewhere
#somewhere
<A HREF="http://www.microsoft.com#somewhere" onmouseover="window.status='#somewhere'" onmouseout="window.status=''">However, Internet Explorer 5.0 incorrectly overrides the text in status bar with the hyperlink, regardless of the value that is contained in the window.status property. You can set window.status after a short delay in setTimeout to work around this problem. When you set the window.event.returnValue to true, you ensure that the effect takes place and solves the problem.
Keywords: kbprb KB185532