Jump to content

Scroll bar script


jaymc

Recommended Posts

I need some javascript that will automatically position a webpage at the very bottom of the page

 

Its for use within a chatroom im making, evertime someone submits a message it is displayed in the webpage after its refreshed however the webpage is displayed starting at the top when the most resent info is at the bottom

 

So, how can I automatically position the scroll bar right to the bottom

 

Note: I need one that works with firefox and IE7, which as of yet I cant seem to find. In IE7 it randomly positions the scroll bar

 

Thanks in advance!

Link to comment
https://forums.phpfreaks.com/topic/53780-scroll-bar-script/
Share on other sites

You can use the scrollIntoView() function when the page loads, more details here http://msdn2.microsoft.com/en-us/library/ms536730.aspx

 

 

Basiclly, put an element all the way in the end of the page (spacer image for example) and when the page loads, make it scroll into view.

 

This should work in all browsers.

Link to comment
https://forums.phpfreaks.com/topic/53780-scroll-bar-script/#findComment-266388
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.