PRB: HREF="#" with Event Code Behaves Differently (190244)
The information in this article applies to:
- Microsoft Internet Explorer (Programming) 4.0
- Microsoft Internet Explorer (Programming) 4.01
This article was previously published under Q190244 SYMPTOMS
The following HTML statement, when clicked, will navigate to a new URL in
Internet Explorer 3.0, but fails to do so in Internet Explorer 4.0:
<A HREF="#" onclick="window.location.href='http://www.microsoft.com';">
problem repro </A>
CAUSE
Internet Explorer 4.0 waits until all events from the <A> tag are finished
before processing the HREF attribute, so window.location.href will be
overwritten by HREF="#".
RESOLUTION
Here are three ways to make this tag work as expected in Internet Explorer
4.0. See the "More Information" section for a complete code listing.
STATUS
This behavior is by design.
REFERENCESFor more information about developing Web-based solutions for Microsoft Internet Explorer, visit the following Microsoft Web sites:
For more information about Microsoft Scripting technologies, see the
following Web site:
Modification Type: | Major | Last Reviewed: | 5/11/2006 |
---|
Keywords: | kbBug kbhtml kbprb kbScript KB190244 |
---|
|