Microsoft KB Archive/255541: Difference between revisions

From BetaArchive Wiki
m (Text replacement - ">" to ">")
m (Text replacement - """ to """)
 
Line 61: Line 61:
== RESOLUTION ==
== RESOLUTION ==


To resolve this problem, re-enable scrolling by removing SCROLL=NO from the BODY element or stop using &quot;scroll: no&quot; in the style information for the BODY.<br />
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.<br />
<br />
<br />
Replacing these items with a style of &quot;overflow:hidden&quot; 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.
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.
<pre class="codesample"><BODY STYLE=&quot;overflow: hidden&quot;>
<pre class="codesample"><BODY STYLE="overflow: hidden">
...
...
</BODY>
</BODY>
Line 80: Line 80:
'''1.HTM'''
'''1.HTM'''
<pre class="codesample"><HTML>
<pre class="codesample"><HTML>
<FRAMESET COLS=&quot;20%,80%&quot;>
<FRAMESET COLS="20%,80%">
   <FRAME NAME=&quot;menu&quot; TARGET=&quot;main&quot; SRC=&quot;2.HTM&quot;>
   <FRAME NAME="menu" TARGET="main" SRC="2.HTM">
   <FRAME NAME=&quot;main&quot; SRC=&quot;3.HTM&quot;>
   <FRAME NAME="main" SRC="3.HTM">
</FRAMESET>
</FRAMESET>
</HTML>
</HTML>
Line 88: Line 88:
'''2.HTM'''
'''2.HTM'''
<pre class="codesample"><HTML>
<pre class="codesample"><HTML>
<A HREF=&quot;3.HTM#section1&quot; TARGET=&quot;main&quot;>Goto Section 1</A><BR>
<A HREF="3.HTM#section1" TARGET="main">Goto Section 1</A><BR>
<A HREF=&quot;3.HTM#section2&quot; TARGET=&quot;main&quot;>Goto Section 2</A><BR>
<A HREF="3.HTM#section2" TARGET="main">Goto Section 2</A><BR>
<A HREF=&quot;3.HTM#section3&quot; TARGET=&quot;main&quot;>Goto Section 3</A><BR>
<A HREF="3.HTM#section3" TARGET="main">Goto Section 3</A><BR>
</HTML>
</HTML>
                 </pre>
                 </pre>
Line 96: Line 96:
<pre class="codesample"><HTML>
<pre class="codesample"><HTML>
<BODY SCROLL=NO>
<BODY SCROLL=NO>
<DIV ID=section1 STYLE=&quot;position:absolute;top:0&quot;>
<DIV ID=section1 STYLE="position:absolute;top:0">
  This is section 1<BR>
  This is section 1<BR>
  <input type=button value=&quot;Scroll to section 3&quot; onclick=&quot;section3.scrollIntoView(true)&quot;>  
  <input type=button value="Scroll to section 3" onclick="section3.scrollIntoView(true)">  
</DIV>
</DIV>
<DIV ID=section2 STYLE=&quot;position:absolute;top:4000&quot;>
<DIV ID=section2 STYLE="position:absolute;top:4000">
  This is section 2
  This is section 2
<DIV>
<DIV>
<DIV ID=section3 STYLE=&quot;position:absolute;top:8000&quot;>
<DIV ID=section3 STYLE="position:absolute;top:8000">
  This is section 3
  This is section 3
</DIV>
</DIV>

Latest revision as of 13:53, 21 July 2020

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