redbullmarky Posted June 12, 2006 Share Posted June 12, 2006 Hi allMaybe a simple one:I have a text field. Underneath the next field is a list of words. When you click on a word, it's added to the text field.The problem is that once the text field is full, you cant see what's being added as the textfield doesnt automatically shift across.Is there a way to automatically put the newly added text in view, just as if i was typing in the field itself?CheersMark Quote Link to comment Share on other sites More sharing options...
redbullmarky Posted June 12, 2006 Author Share Posted June 12, 2006 * bump * anyone? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted June 13, 2006 Share Posted June 13, 2006 I dont know how to do it but I do know that you'll need to use a function called scrollTo which you can use to make the texbox scroll to the end when a word is inserted.The syntax is like this:[code]srollTo(x position, y position)[/code] Quote Link to comment Share on other sites More sharing options...
redbullmarky Posted June 13, 2006 Author Share Posted June 13, 2006 [!--quoteo(post=383208:date=Jun 13 2006, 12:38 PM:name=wildteen88)--][div class=\'quotetop\']QUOTE(wildteen88 @ Jun 13 2006, 12:38 PM) [snapback]383208[/snapback][/div][div class=\'quotemain\'][!--quotec--]I dont know how to do it but I do know that you'll need to use a function called scrollTo which you can use to make the texbox scroll to the end when a word is inserted.The syntax is like this:[code]srollTo(x position, y position)[/code][/quote]HiI gave it a go, but unfortunately didnt work. The error returned in the Javascript Console was: el.scrollTo is not a function. It had no effect on the actual textfield at all. 'el' is define using document.getElementById('mytextfield')Any other ideas?CheersMark Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted June 13, 2006 Share Posted June 13, 2006 Oh crap I'm such a dumb-butt! I was supposed to type [b]scrollTo[/b] not srollToSo yeah the function is:[code]scrollTo(x position, y position);[/code]Also you are using it on textarea (< textarea></textarea>) and not a text input field? Quote Link to comment Share on other sites More sharing options...
redbullmarky Posted June 14, 2006 Author Share Posted June 14, 2006 [!--quoteo(post=383391:date=Jun 13 2006, 07:04 PM:name=wildteen88)--][div class=\'quotetop\']QUOTE(wildteen88 @ Jun 13 2006, 07:04 PM) [snapback]383391[/snapback][/div][div class=\'quotemain\'][!--quotec--]Oh crap I'm such a dumb-butt! I was supposed to type [b]scrollTo[/b] not srollToSo yeah the function is:[code]scrollTo(x position, y position);[/code]Also you are using it on textarea (< textarea></textarea>) and not a text input field?[/quote]i noticed the spelling bit :)at the moment, i'm hoping to use it on a textfield, not a text area, although the text area option will come up later. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.