Hello I'm having some trouble with scrollbars and loading pages. When the user clicks on buttons, content loads into another div, using javascript/iframes to call separate html files. That all works fine. But if you scroll down the loaded content, and then click another button (the buttons are housed in a separate div), the new content loaded will be partially scrolled down already, and I would like it to load at the TOP! The scrollbars are setup simply using CSS overflow=auto feature. I have tried a few solutions to no avail: 1. In the html files that are called when the user clicks the buttons, I have tried <body onLoad="window.scrollTo(0,0) Code (markup): 2. In the calling javascript (the button the user clicks) I have tried adding an anchor: <a href="javascript:loadSource('right',null,'mandatorypreworkshopinfo.html#top')"> Code (markup): and added the <a name="top"></a> Code (markup): to the top of the html file being called. That has no effect either. I have spent hours on this already. Please help if you can Thanks. -Rick
http://www.beginningsguide.com/content/prior.htm the site is password protected: username: admin Password: 0220220 It only works 100% in IE right now, sorry. In order to experience the problem, you can click on "prior to arrival" at top or bottom, then on the left click on "what to send us." scroll down the content on the right, and then click on a different left-link: "mandatory pre-workshop information." You will see that the newly loaded right content loads in middle or at bottom. The scrollbars are from CSS. I'm trying to either reset them somehow, or get the page to load at the top. A 3rd option logically might be to load a blank page BEFORE loading the new link (to somehow get it to load two pages, one right after the other) since after clicking on a page without enough text to warrant scrollbars, the next scrolled page loads at the top. I will love you more than you can imagine if you can help me. Thanks!
this is actually pretty obvious. The content is changing without page reloads and the div doesn't know that so it keeps the scrollbar right where it was. you need to force reloads, or reset the scollbar.
awesome. might you be able to point me in the right direction to either or both of those things? I can't find out how to reset a scrollbar that's CSS controlled. I fear I may have gotten in a bit over my head with this, but that's how we get better I suppose.