move the <Enter> focus between 2 buttons

R

Rocio

I have a aspx page, with 2 controls (ascx).

Control1 contains a SEARCH button, and textbox to enter the string to
search for.
Control 2 contains a LOGIN button, and 2 text boxes to enter the
username & password to login.
Any user can perform a search, but if he applies for an account, he
can login and performed an enhanced search.

Currently, the SEARCH button responds when the user clicks <Enter>,
which works find if he is doing a search.

But if he has an account and enters his username & passowrd and
presses <Enter> the command goes to the SEARCH button, this case doing
nothing since he did not enter anything to search for.

How can I switch the focus of the <Enter> from SEARCH to LOGIN buttons
in the same page? I'm figuring, when the user focuses in the
txtUserName for example, I would like to change the focus from the
SEARCH button to the LOGIN when he presses <Enter>.

Is this possible? Anyone knows how?

TX! in advance!
 
R

Rocio Katsanis

Tx for your reply Steve.
As a matter of fact yesterday I did more research and found your reply
to a similar issue, pointing to the first link as a solution in this
reply.
It worked fine.

Thanks for the other information links as well.

-r
 

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

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top