HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
scrolling
Post new topic   Reply to topic    HTML Help Forum Index -> General HTML
View previous topic :: View next topic  
Author Message
nishanthaMe



Joined: 14 May 2008
Posts: 3

PostPosted: Wed May 14, 2008 12:43 am     scrolling Reply with quote

I have created a div element and I add content (text) to that div dynamically. But the problem is that, the latest data added to the div can be seen by scrolling it and this makes the user to scroll down to view new data added to the div always. So how can I stop this and automatically scroll down to show tha ned data to the user with out making him to scroll

Thanks
sticks464



Joined: 31 Dec 2006
Posts: 1171

PostPosted: Wed May 14, 2008 4:37 am     Reply with quote

Don't specify a height for the div or add to the div style overflow:visible. But the overflow:visible may break the layout.
nishanthaMe



Joined: 14 May 2008
Posts: 3

PostPosted: Wed May 14, 2008 7:52 pm     Reply with quote

Igot it working by

var contentV=document.getElementById("content");
contentV.scrollTop = contentV.scrollHeight - contentV.clientHeight;

Thanks for the support
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> General HTML All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial