Car Accident Lawyer Los Angeles - Credit Cards UK - Mortgages - Credit Cards - Loans

PDA

View Full Version : Please HELP! Code tags needed... -


gweb
Feb 2nd 2008, 3:06 pm
Hi I have a text area HERE (http://www.mp3drop.com/links.php) - and I want it so that when the visitor clicks in the box - it automatically 'selects all'.

At the moment they have to manually scroll to select all and then copy. Please can someone help me with what the code is for this...?




:confused: PLEASE :cool:

dem0x7
Feb 2nd 2008, 6:40 pm
Hi gweb,

Try this Javascript onclick code in your text area box:

<textarea name="textarea" rows="10" cols="80" onClick="javascript:this.form.textarea.focus();this.form.textarea.select();">

That should do it for you, let me know if it works. Remember to replace the "textarea" in the code, to whatever your textarea name is!

gweb
Feb 3rd 2008, 3:10 am
OK thanks!!! I will try this now and I hope it works :)