faqts : Computers : Programming : Languages : JavaScript : Frames

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

19 of 29 people (66%) answered Yes
Recently 4 of 10 people (40%) answered Yes

Entry

If I have scrollbars turned off for my frame and my document is very long and contains anchors, how do I navigate to them via javascript?

Aug 29th, 2000 07:38
Martin Honnen, Anthony Magnolia,


You should use
  <FRAME SCROLLING="auto"
if you know your document to need scrolling. At least in NN you can't 
scroll a document, not even with JavaScript, if SCROLLING="no".
For IE it might work to use
  window.scrollBy(dx, dy);
  window.scrollTo(x , y);
or
  location.hash = '#anchorName';