Microsoft KB Archive/185532

= PRB: Moving Mouse Pointer Over Anchor Tag Shows Entire URL =

Article ID: 185532

Article Last Modified on 5/11/2006

-

APPLIES TO


 * Microsoft Internet Explorer 4.0 128-Bit Edition
 * Microsoft Internet Explorer 4.01 Service Pack 2
 * Microsoft Internet Explorer 5.0
 * Microsoft Internet Client Software Development Kit 4.0
 * Microsoft Internet Client Software Development Kit 4.01

-



This article was previously published under Q185532



SYMPTOMS
When you move the mouse pointer over an Anchor tag that has a Fragment Identifier in the URL, the entire URL is displayed in the status bar. In Internet Explorer 3.02, only the Fragment Identifier is displayed, not the entire URL.



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:    function showStatus(text) { window.setTimeout("window.status='" + text + "'", 1); }    Link 1  Link 2  

-or-

   function showStatus(text) { window.event.returnValue = true; window.status = text; } </SCRIPT> </HEAD>  Link 1</A>  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:


 * 1) somewhere

In Internet Explorer 4.0, you can set the status bar text directly in the onmouseover event as follows:  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.

<div class="references_section">