Open Source Development Tutorials | Newsletter Signup | About Us
Search  

Go Back   Open Source Tutorials Forum > Web Development > HTML, JavaScript & CSS
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-03-2004, 09:47 AM
gabepreston gabepreston is offline
Junior Member
 
Join Date: Feb 2004
Location: Chadds Ford, PA
Posts: 3 gabepreston is on a distinguished road
Default Scrolling to bottom of Textarea

Hey guys,

Got a question here that I'm hoping someone can answer. I have a <textarea> field in my document that is being fed data from a script as the page loads. The content of the textarea grows rather fast. As such, for the user to view the new data, they have to continually drag the scroll bar down the side to see the newest data as it appears. What I want to do is this- automatically keep the <textarea> scrolling to the bottom so all the new data is shown as it appears. Once the page loads, it will stop scrolling to the bottom of the <textarea> so that the person can now scroll up and down through the data at their leisure. I've spent some time looking around, and I saw some references to the 'scrollTop' object property, but I really don't know if thats right, let alone what to do with it. Any suggestions? Thanks for your time.

-gabriel
Reply With Quote
  #2  
Old 09-07-2004, 04:36 PM
md_doc md_doc is offline
ubergeek
 
Join Date: Oct 2003
Posts: 204 md_doc has disabled reputation
Default sorry gabe

Sorry gabe I did not see you post this earlier. I am out of town right now but when I get back in town I will post a solution for you. Really not that difficult I do not think depending on if I understand what you are saying or not.
__________________
md
Reply With Quote
  #3  
Old 09-20-2004, 09:51 AM
gabepreston gabepreston is offline
Junior Member
 
Join Date: Feb 2004
Location: Chadds Ford, PA
Posts: 3 gabepreston is on a distinguished road
Default

Don't know if you've gotten back from vacation or not yet Doc, but I still haven't had any luck getting this to work. So if you are back, lets see if we can sit down some night and figure this out, or if you want to do it on your own, that's cool too.
Reply With Quote
  #4  
Old 09-20-2004, 10:02 AM
md_doc md_doc is offline
ubergeek
 
Join Date: Oct 2003
Posts: 204 md_doc has disabled reputation
Default work out of state

Gabe... I work out of state Monday - Wednesday but I will stay at work late today and get online and try to hook up with you to figure it out. I will IM you around 6pm or so.
__________________
md
Reply With Quote
  #5  
Old 12-22-2004, 11:53 AM
Jasmine Jasmine is offline
Junior Member
 
Join Date: Dec 2004
Posts: 1 Jasmine is on a distinguished road
Default

After a considerable search, I have found an answer.
is it relatively simple.

textareaname.scrollTop = textareaname.scrollHeight;

hope this helps
Reply With Quote
  #6  
Old 06-21-2007, 12:54 AM
Ezuriah Ezuriah is offline
Junior Member
 
Join Date: Jun 2007
Posts: 1 Ezuriah is on a distinguished road
Default

Quote:
Originally Posted by Jasmine
After a considerable search, I have found an answer.
is it relatively simple.

textareaname.scrollTop = textareaname.scrollHeight;

hope this helps


This sure did for me, thanks for posting it.


~ Ezuriah
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump



All times are GMT -5. The time now is 07:15 AM.


Powered by: vBulletin Version 3.0.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright 2004 - 2006 GrindingGears.com. All Rights Reserved.