From MSDN:
When there is more than one INPUT type=submit in the same form, pressing
enter submits the form using the first INPUT type=submit, unless another
INPUT type=submit has focus. When another INPUT type=submit has focus,
pressing enter submits the form using that INPUT type=submit.
If you don't like this behavior, you can use JavaScript to trap the
OnKeyPress event, and if it is the enter key (13), fire the click method of
the button you want to be the default.
--
Chris Jackson
Software Engineer
Microsoft MVP - Windows XP
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--
"Bratislav Jevtic" <in*******@ptt.yu> wrote in message
news:eD****************@tk2msftngp13.phx.gbl...
hi,
how to make some push button default on the form? for instance, I've got 2
buttons (Submit, Cancel). submit is on the left, cancel on the right side.
on enter key pressed, cancel button is processed - wrong. so, how to make
a button default (when one presses ENTER then it's processed onClick event)?
thanks,
bj