posted 19 years ago
On my page I have a textbox and two buttons - First is "Cancel" button and the second is "Next" button.
Now I have a problem of "the user have to use mouse to click Next button after fill in the textbox". When the user hit "Enter" key, it triggers "Cancel" button, which is the next element.
I have the following html for this Next button.
<input type="image" src="/images/bt_next.png" name="btnNext" value="next" /<
I use the following code to force it to focus to the Next button.
onKKKeyUp="if(this.value.length==4) {this.frmXXX.btnNext.focus()}"
JavaScript complains that my btnNext is null or not an object.
My question is "is Name valid in <input type="image" ....>? Does anybody know how to attain my goal?
Got to fix it. Thanks in advance for your help.
Cathie