Clear form field?

G

Garry Jones

Using this code

if (form.scfmpwd1.value != form.scfmpwd2.value) {
alert( "Password mismatch - Try again" );
form.scfmpwd1.focus();
return false ;
}

And a checkform proceedure I can capture the form before processing if the
user enters enters a typo on one of his/her passwords.

However when using "form.scfmpwd1.focus() to reposition the cursor in the
first password field the field is left with the junk in it. Can I clean out
the data the user entered giving them a chance to start over with blank
fields.

Appreciate any help, thanks

Garry Jones
Sweden
 
M

McKirahan

Garry Jones said:
Using this code

if (form.scfmpwd1.value != form.scfmpwd2.value) {
alert( "Password mismatch - Try again" );
form.scfmpwd1.focus();
return false ;
}

And a checkform proceedure I can capture the form before processing if the
user enters enters a typo on one of his/her passwords.

However when using "form.scfmpwd1.focus() to reposition the cursor in the
first password field the field is left with the junk in it. Can I clean out
the data the user entered giving them a chance to start over with blank
fields.


form.scfmpwd1.value = "";
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top