Re: Invoke code behind image-button with <Enter> key from anywhere on



Paul,

what you basically have to do is to assign a tiny js function to the keydown
event of your password input field which will trigger the ok.click.

HTHs

Daniel

"se-marten" <se-marten@xxxxxxxxxxxxxxxxxxxxxxxxx> schrieb im Newsbeitrag
news:2A622C9C-2E3D-4C80-8CDF-80757E8EF9DC@xxxxxxxxxxxxxxxx
>
>
> "Paul W" wrote:
>
>> On my simple login-screen I have a 'username' and 'password' field and an
>> imagebutton for the 'OK'.
>>
>> This used to work nicely so that when the user hit <Enter> from the
>> password
>> field, it invoked the VB code behind the image-button, and away he went.
>> Suddenly this has stopped working like this. It still works if you use
>> the
>> mouse to click on the button, or first TAB to it, then click <Enter>.
>> However, if you now hit <Enter> with the cursor still in the 'password'
>> field it submits the form, runs Page_Load, but doesn't call the
>> image-button's click event.
>>
>> A 'working' version is at
>> http://www.mystictennisbookings.com/admin/login.aspx . FYI - what I did
>> that
>> seemed to break it was to replace the Textbox webcontrol that I used for
>> the
>> 'Username' field with a Dropdown webcontrol.
>>
>> Any ideas how I can restore the required functionality? Thanks,
>>
>> Paul.
>>
>>
>>


.