Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Input Box scroll

Status
Not open for further replies.

miah

Programmer
Sep 27, 2002
3
US

Hi,

I have an app that populates an input element when the user selects items from a dropdown or presses a button. I can get this working but if the string gets long the user does not see the text being added (it is getting added alright but off screen)

Can i use javascript to automatically scroll the text area as it gets longer

Thanks
LM
 
you can't change textarea size with javascript, but you can with css
 
I don't think they want to change the textarea SIZE, just scroll it so the end of the text in it is always visible. I'm not sure how to do this, but someone must know. How do you position the cursor in a textarea? Positioning the cursor at the end of the text each time some is added to the textarea ought to do it.
Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
-> i remember lots of threads on positionning the cursor in a textarea - it ended up saying there is NO WAY to retrieve the cursor's position, neither to position it - i might perform a search to find you some thread number (but still, if anyone has an idea on how to retrieve/position the cursor ... i'm interested !!!)
-> there is no way to explicitly scroll a textarea, as it is auto-scrollable !! try it, you'll see that as soon as you typed more than what was visible the scroll bar appears
-> if what miah wanted was a textarea that expand with the user's input, the only way i can think of is with css
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top