RESOLUTION
To change URL information that is displayed in the status bar, use the window.status property. To do this, create a Web page, and paste one of the following code samples:
<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>
<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
When you move the mouse over the "Link2" text, the status bar shows the
Fragment Identifier:
In Internet Explorer 4.0, you can set the status bar text directly in the onmouseover event as follows:
<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.