Jump to content


Photo

Auto Scroll Down For TextArea


  • Please log in to reply
4 replies to this topic

#1 betrid

betrid

    Young Padawan

  • Members
  • Pip
  • 3 posts

Posted 22 August 2007 - 08:06 AM

hi
i've made a page contains
sometextarea.value += "some string";
when contents of the textarea got more than the "rows" of it, a scroll bar will be appeard.
but it does not scroll down the textarea.
how can i make browser auto scroll down?!
thanx

#2 faulk

faulk

    Young Padawan

  • Members
  • Pip
  • 72 posts
  • Gender:Male
  • Location:Moosup, CT
  • Interests:Web design<br />Music<br />Audio engineering<br />Baseball (red sox!)<br />Snowboarding<br />Video production<br />Web app development

Posted 22 August 2007 - 09:59 AM

You can't make a browser actually scroll on its own, however you can force it to move to the bottom of the textarea

Try this:
sometextarea.scrollTop = sometextarea.scrollHeight;

#3 betrid

betrid

    Young Padawan

  • Members
  • Pip
  • 3 posts

Posted 23 August 2007 - 02:35 AM

oh thanku very much!!

#4 betrid

betrid

    Young Padawan

  • Members
  • Pip
  • 3 posts

Posted 23 August 2007 - 03:15 AM

thanx thanx thanx :P

#5 faulk

faulk

    Young Padawan

  • Members
  • Pip
  • 72 posts
  • Gender:Male
  • Location:Moosup, CT
  • Interests:Web design<br />Music<br />Audio engineering<br />Baseball (red sox!)<br />Snowboarding<br />Video production<br />Web app development

Posted 23 August 2007 - 08:02 AM

you're welcome :P




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users