![]() |
Form code...what am I doing wrong here?
I am trying to create a button that will highlight the text in a form so people can copy it.
There will be a lot of text in the form, otherwise I wouldn't worry about it. This will be posted on a wordpress blog. I've tried it in both firefox and IE and it doesn't highlight the text :( <form name="copyThis"> <textarea name="codeToCopy" cols="40" rows="5" readonly="readonly"> Click on the button below to highlight this text. </textarea> <br> <input type="button" value="Highlight All" onclick="javascript:this.form.codeToCopy.focus();t his.form.codeToCopy.select();"> </form> Please help thanks in advance |
your code snubbed you
|
Quote:
|
this.form doesn't exist.
try document.copyThis.codeToCopy.select(); |
Quote:
|
Quote:
|
Forms these days...
|
| All times are GMT -7. The time now is 04:41 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123