473,378 Members | 1,280 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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

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.
Nov 19 '05 #1
4 2161
So are using a DropDown webcontrol for the Username box on this page at
http://www.mystictennisbookings.com/admin/login.aspx ?

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #2
The link I sent is to the original version that works as desired - hitting
<Enter> from the password field here will invoke the code behind the
image-button.

There's a copy of the version that does NOT work at
http://www.mystictennisbookings.com/...est/login.aspx - here if you hit <Enter>
from the password field it submits the form but doesn't execute the
image-button event.

Paul.

Paul.
"Patrick Olurotimi Ige" <na********@hotmail.com> wrote in message
news:e$**************@TK2MSFTNGP09.phx.gbl...
So are using a DropDown webcontrol for the Username box on this page at
http://www.mystictennisbookings.com/admin/login.aspx ?

*** Sent via Developersdex http://www.developersdex.com ***

Nov 19 '05 #3


"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.

Nov 19 '05 #4
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*******@discussions.microsoft.com> schrieb im Newsbeitrag
news:2A**********************************@microsof t.com...


"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.

Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Robin S. | last post by:
I tried to ask this question several days ago, but I didn't explain my application correctly. Basically I want to have one record from table "A" and I want to display, say, 5 records from table...
5
by: PD | last post by:
The TextChanged event is not being called when I hit the "Enter" key. Yet it does for the "Tab" key. I set a break point in the Page_Load event and the TextChanged event and none of these get...
6
by: Clark Sann | last post by:
Can someone help me understand what object should be used as the lock object? I've seen some programs that use Monitor.Enter(Me). Then, in those same programs, they sometimes use another object. ...
1
by: YoMamaJoe | last post by:
I know how to make a mailto: link which has the subject, etc. But, how do I make a form which lets the user upload a file which would be an attatchment? I am planning on making an image upload...
4
by: MLH | last post by:
I seem to remember the code below working before. But, today, it is not. Instead, I get a 2450 error complaining that it cannot find the named form. This is true regardless of which form name I...
2
by: Jaye | last post by:
Hi. I'm having some trouble with the code I'm using to validate a form. The form is used to query a database and users can enter multiple search criteria separated by commas. Since search criteria...
2
dlite922
by: dlite922 | last post by:
got the following code that works great in IE, i have need an exception to these rules. Why to Tab? Users come from old Apps (data entry people) and want to use the enter key to move through...
13
by: DDragon | last post by:
ok here is the problem, i have to forms which have values i wish to be added together i can add together the values in one form all right but im having problems with adding the values of the other...
9
by: Hamayun Khan | last post by:
Hi I m using form like below <form action='' method = post> <input type=text name=txt id=txt> <select name=region id=region multiple> <option value=1>ONE</option> <option value=2>Two</option>...
3
by: bilalkhan | last post by:
Hello I m using MS Acces 2007, I need to create a form through which a user can enter all the parameter values in the form and these values will automatically picked by a query: Here is the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.