Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.