D
David
Here is the layout of my form from left to right, from top to down.
- buttonA, buttonB, buttonC
- textbox, textbox, textbox
- buttonXXX
After the user types in the textboxes and press enter (with the cursor still
in one of the textboxes), buttonXXX should be pressed by default.(the user
is too lazy to take the cursor over to buttonXXX and click).
The problem is the top/left most button (button A) gets pressed which annoys
them to death. So I tried to do this.
In the bottonA's onfocus event handle
document.forms[0].elements['buttonXXX'].focus() .
Result: ButtonXXX receives focus alright, but the code for buttonA still
executes! Any help would be greatly appreciated.
I posted this question earlier and someone suggested using this control from
MetaBuilder which allows you to set the first control to receive focus. In
this case, the user fills out a bunch of textboxes (so the focus is on one
of the textboxes at this point), then presses enter. I don't think onenter
is one of the attributes that can be programmed against.
- buttonA, buttonB, buttonC
- textbox, textbox, textbox
- buttonXXX
After the user types in the textboxes and press enter (with the cursor still
in one of the textboxes), buttonXXX should be pressed by default.(the user
is too lazy to take the cursor over to buttonXXX and click).
The problem is the top/left most button (button A) gets pressed which annoys
them to death. So I tried to do this.
In the bottonA's onfocus event handle
document.forms[0].elements['buttonXXX'].focus() .
Result: ButtonXXX receives focus alright, but the code for buttonA still
executes! Any help would be greatly appreciated.
I posted this question earlier and someone suggested using this control from
MetaBuilder which allows you to set the first control to receive focus. In
this case, the user fills out a bunch of textboxes (so the focus is on one
of the textboxes at this point), then presses enter. I don't think onenter
is one of the attributes that can be programmed against.