PRB: Using AppletContext.showDocument() to navigate to an Anchor

Last reviewed: January 29, 1998
Article ID: Q169809
The information in this article applies to:
  • Microsoft Visual J++, versions 1.0, 1.1 on the following platform: x86
  • Microsoft Internet Explorer (Programming), versions 3.01, 3.02 on the following platform: x86
  • Microsoft Win32 Virtual Machine for Java

SYMPTOMS

Calling AppletContext.showDocument(URL) with a URL that contains an anchor (http://myserver/mypage.html#myanchor) opens the correct Web page but does not navigate to the anchor.

CAUSE

A problem with Internet Explorer 3.x prevents navigation to the anchor.

RESOLUTION

Use two pound sign's (#) instead of one before the anchor name (for example, http://myserver/mypage.html##myanchor). Internet Explorer 3.x will interpret this as having one pound sign and navigate to the anchor.

STATUS

Internet Explorer 4.0 does not exhibit this behavior and ignores the extra pound sign if present.

REFERENCES

For the latest Knowledge Base articles and other support information on Visual J++ and the SDK for Java, see the following page on the Microsoft Technical Support site:

   http://support.microsoft.com/support/visualj/
   http://support.microsoft.com/support/java/


Additional query words: anchor showDocument URL

Keywords : kbother VJMisc
Technology : kbInetDev
Version : WINDOWS:1.0,1.1,3.01,3.02
Platform : WINDOWS
Hardware : x86
Issue type : kbprb


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 29, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.