ASP Reading Keyboard

J

Jay

I have a web page that waits for a users to enter a number and press ENTER
simulating the click on the submit button. The problem is when the page
reloads the cursor is not in the textfield on the form. There will be no
mouse hooked up to this PC so I need to be able to have the users type a
number 1-5 and press enter and it will go to another page. Is there a way
to monitor the keyboard and wait for 1-5 to be press and execute a
response.redirect or something of the sort?

Thanks!
 
T

Tom Kaminski [MVP]

Jay said:
I have a web page that waits for a users to enter a number and press ENTER
simulating the click on the submit button. The problem is when the page
reloads the cursor is not in the textfield on the form. There will be no
mouse hooked up to this PC so I need to be able to have the users type a
number 1-5 and press enter and it will go to another page. Is there a way
to monitor the keyboard and wait for 1-5 to be press and execute a
response.redirect or something of the sort?

This has nothing to do with ASP, it's a client-side issue. See the focus
method:
http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/focus.asp

--
Tom Kaminski IIS MVP
http://www.microsoft.com/windowsserver2003/community/centers/iis/
http://mvp.support.microsoft.com/
http://www.iisfaq.com/
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
http://www.tryiis.com
 

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
474,161
Messages
2,570,891
Members
47,423
Latest member
henerygril

Latest Threads

Top