How to disable the default button?

  • Thread starter Thread starter cw
  • Start date Start date
C

cw

Hi group,
My page consist of few text boxes and a server side button control
(asp:button), when i finished editing and press enter key, it will fire up
the button click event. How to disable this event till i click or focus to
the button?

regards,
 
Hi:

You can trap the ENTER key (event.keyCode) and return false. Optionally before return false, you can also show the user some message.

That should nullify 'Enter' Button effect.
--
================================
Deepak Kumar Vasudevan (MVP)
CS Software Solutions

Phones: +91-44-2819-1336 thru 38
91-98400-26014
www.cssolutionsinc.com

Mailbox Protected by SpamPal (http://www.spampal.org.uk/)
================================
Hi group,
My page consist of few text boxes and a server side button control
(asp:button), when i finished editing and press enter key, it will fire up
the button click event. How to disable this event till i click or focus to
the button?

regards,
 
Back
Top