How to disable the default button?

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,
 
D

Deepak Kumar Vasudevan

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
================================
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,
 
Last edited by a moderator:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top