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 Link to comment https://forums.phpfreaks.com/topic/11776-textfieldarea-keep-recent-added-text-in-view/ Share on other sites More sharing options...
redbullmarky Posted June 12, 2006 Author Share Posted June 12, 2006 * bump * anyone? Link to comment https://forums.phpfreaks.com/topic/11776-textfieldarea-keep-recent-added-text-in-view/#findComment-44750 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] Link to comment https://forums.phpfreaks.com/topic/11776-textfieldarea-keep-recent-added-text-in-view/#findComment-44964 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 Link to comment https://forums.phpfreaks.com/topic/11776-textfieldarea-keep-recent-added-text-in-view/#findComment-45137 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? Link to comment https://forums.phpfreaks.com/topic/11776-textfieldarea-keep-recent-added-text-in-view/#findComment-45142 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. Link to comment https://forums.phpfreaks.com/topic/11776-textfieldarea-keep-recent-added-text-in-view/#findComment-45294 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.