jaymc Posted May 31, 2007 Share Posted May 31, 2007 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! Quote Link to comment Share on other sites More sharing options...
nogray Posted June 1, 2007 Share Posted June 1, 2007 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.