Quote:
quote:Originally posted by dmerrill
I would like it to go back to "username" after reset is clicked. Thanks for your help!
Dawn
K. Dawn Merrill
|
Hello,
I am using the exact same script and all the questions I had were answered by you guys. I was trying to figure out how to set focus on the username box, how to use the Enter key to logon, and how to re-set focus to the username box after the Reset button was clicked. I figured out the last one by trial and error. This is what I did and it works:
Here what the code looked like before:
if(imgReset == ""){
document.write('<input type="reset" value="Reset" name="Reset">');
} else {
document.write('<input type="image" src="'+imgReset+'" name="Reset" onclick="logon.reset();">');
Here's what did and it works so far:
if(imgReset == ""){
document.write('<input type="reset" value="Reset" name="Reset"
onclick="document.logon.username.focus();">');
} else {
document.write('<input type="image" src="'+imgReset+'" name="Reset" onclick="logon.reset();">');
Basically I just added the setFocus() function code to the end of that first part. I'm a bigtime rookie so I don't know if what I did is considered normal, but it seems to work and since you guys helped me out I wanted to at least attempt to help you out. Thanks again. I really appreciate it.