Microsoft KB Archive/255541

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 12:53, 21 July 2020 by X010 (talk | contribs) (Text replacement - """ to """)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Article ID: 255541

Article Last Modified on 5/12/2003



APPLIES TO

  • Microsoft Internet Explorer 5.0
  • Microsoft Internet Explorer 5.01



This article was previously published under Q255541

SUMMARY

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.

CAUSE

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

RESOLUTION

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">
...
</BODY>
                

MORE INFORMATION

Steps to Reproduce Behavior

Create the following three HTM files:

1.HTM

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

2.HTM

<HTML>
<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>
</HTML>
                

3.HTM

<HTML>
<BODY SCROLL=NO>
<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>
<DIV ID=section2 STYLE="position:absolute;top:4000">
 This is section 2
<DIV>
<DIV ID=section3 STYLE="position:absolute;top:8000">
 This is section 3
</DIV>
</BODY>
</HTML>
                

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.

STATUS

This behavior is by design.

Keywords: kbnavigation kbprb kbdhtml KB255541