View Full Version : Auto selecting text?
Xphic
Mar 24th 2008, 7:05 am
Hey, you know in photobucket how it will automatically select the textbox for users that upload images.
Well I am try to do that, imgsync has the same thing, Any ideas on how to achieve that?
scubita
Mar 24th 2008, 7:08 am
Hi
I just Googled it and voilá:
http://www.matts411.com/webdev/auto_selecting_text_in_various_html_elements_with_javascript
dnbox
Mar 24th 2008, 7:11 am
<input name="" type="text" value="auto select text" onclick="javascript:this.select();" readonly="yes" />
:D
Xphic
Mar 24th 2008, 7:17 am
Alright, thank you, and I googled it to but couldn't find anything, what did you search for?
scubita
Mar 24th 2008, 7:37 am
Simple just did this one (http://www.google.pt/search?q=+Auto+selecting+text+javascript&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:pt-PT:official&client=firefox-a)
:)
QiSoftware
Mar 24th 2008, 10:22 am
In an onload function call you could also set focus for the input text field if you provide the name identifer.
Q...
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.