Click to See Complete Forum and Search --> : Highlighting the value


kwok3d
05-30-2003, 01:23 PM
i was trying to merge a highlighting function into a submit button. and this script only highlight the text field... what should i change to make it highlight the value?

<input type=button value="Highlight All" onClick="javascript:this.form.txt.focus();this.form.txt.select();">

also how i can merge the highlight function into the submit button?

thanks

Jona
05-30-2003, 01:29 PM
<form name="f" action="" onsubmit="this.txt.select();">
<input type="button" value="Highlight All" onClick="this.form.txt.select();">

khalidali63
05-30-2003, 01:30 PM
this.form.txt.select();

part of the code actually should already be dojng this.It seems like it highlights the text inthe text field name="txt"
make sure the field has the name as its above.