Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/255541

From BetaArchive Wiki

Article ID: 255541

Article Last Modified on 5/12/2003


  • Microsoft Internet Explorer 5.0
  • Microsoft Internet Explorer 5.01

This article was previously published under Q255541


The DHTML scrollIntoView function and hyperlinks that use fragment identifiers fail to scroll a document for which scrolling has been disabled.

Earlier versions of Internet Explorer have allowed this behavior.


Documents have no scrolling capability if scrolling has been disabled on the window.


To resolve this problem, re-enable scrolling by removing SCROLL=NO from the BODY element or stop using "scroll: no" in the style information for the BODY.

Replacing these items with a style of "overflow:hidden" creates a window without scrollbars that is still scrollable through script or hyperlinks with fragment identifiers. Note, however, that the user will still not be able to scroll using PAGE UP and PAGE DOWN keys.

<BODY STYLE="overflow: hidden">


Steps to Reproduce Behavior

Create the following three HTM files:


<FRAMESET COLS="20%,80%">
   <FRAME NAME="menu" TARGET="main" SRC="2.HTM">
   <FRAME NAME="main" SRC="3.HTM">


<A HREF="3.HTM#section1" TARGET="main">Goto Section 1</A><BR>
<A HREF="3.HTM#section2" TARGET="main">Goto Section 2</A><BR>
<A HREF="3.HTM#section3" TARGET="main">Goto Section 3</A><BR>


<DIV ID=section1 STYLE="position:absolute;top:0">
 This is section 1<BR>
 <input type=button value="Scroll to section 3" onclick="section3.scrollIntoView(true)"> 
<DIV ID=section2 STYLE="position:absolute;top:4000">
 This is section 2
<DIV ID=section3 STYLE="position:absolute;top:8000">
 This is section 3

In the left frame, click on the three different hyperlinks. In earlier versions of Internet Explorer, the main frame would scroll to the respective sections. In Internet Explorer 5 and later, the main frame will not scroll at all.


This behavior is by design.

Keywords: kbnavigation kbprb kbdhtml KB255541