...

View Full Version : Textfields



sherlockturtle
11-22-2011, 04:49 PM
SO if you have a text field and a function that adds sentences to it. WHen they get bigger than the text field it makes it have a scroll bar. BUt it always starts at the top(the scroll bar of the text field). Is there a way to keep the scroll bar at the bottom so your always looking at the new text.

sherlockturtle
11-23-2011, 01:27 AM
anyone

Sammy12
11-23-2011, 02:20 AM
I think a <textarea> would be a great solution to your problem!
http://www.w3schools.com/tags/tag_textarea.asp


WHen they get bigger than the text field it makes it have a scroll bar.
That's what a textarea is!


BUt it always starts at the top(the scroll bar of the text field). Is there a way to keep the scroll bar at the bottom so your always looking at the new text.
Maybe you could post a picture, so we can better understand what the problem is!
here's a <textarea>, if you could open this up in paint and draw where the problem is, that would be great!
http://i1114.photobucket.com/albums/k535/auroralight1/Untitled-127.png

questionable
11-23-2011, 02:23 AM
Yeah, <textarea> will make your life nice.

sherlockturtle
11-23-2011, 03:13 AM
ohh sorry i meant a text area:o

Sammy12
11-23-2011, 03:25 AM
an image of the problem you are having would be great!

sherlockturtle
11-23-2011, 03:35 AM
Its hard do show with an image but the problem is theres a text area and a function that adds an sentence. But when the sentance is added it does not scroll to the bottom of the textarea it stays at the top.

Sammy12
11-23-2011, 04:28 AM
I don't think it can be done in CSS, since html doesn't parse within a textarea, so the usual css jump with ids doesn't work!
If I'm not mistaken there isn't a way to do this in javascript, but I actually can't say, since I never had to do this type of stuff, css jumps were the best solution.

Try posting this in the javascript forum, or maybe the admins/mods will move the thread!

EDIT: maybe if the textarea was initially in a div, then swapped into a textarea once the id was found? :confused:

alykins
11-23-2011, 02:19 PM
would also be helpful to see the script that is writing to the textarea



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum