Click to See Complete Forum and Search --> : Execute button click using return key


Ken_dftba
04-24-2008, 03:58 AM
Good Morning everybody,

I have a search form which contains a textbox and a button control. I want the button_click event to execute when the user presses the return key after entering their search in the textbox.

Does anyone know how to do this?

Thanks

abhi_viking
05-07-2008, 09:02 AM
Hi Ken,

you can easliy do the enter stuff using javascript. Just trap the 'enter' key code and call your button_click event handler using JS.

DarkBob
05-14-2008, 06:33 AM
Alternatively you can make your button "type=submit" and it should catch the enter key if it's within the same form.