Check for User input

Associate
Joined
26 Sep 2003
Posts
834
Location
essex
Can VBScript or JavaScript check to see if a key is pressed, and then action a command ?

If not what is the best (free) language to use ?
 
Last edited:
It can be done using javascript as well as vbscript however vbscript is only supported by IE, so I would suggest using javascript.

If you want to check if a key has been pressed on the form field you would do something like this

<input type="text" name="name" id="name" value="" onKeyPress="javascriptfunction();">

The funcion will be executed for each keypress, there are also other events like onkeyup - do a search on google for some examples.
 
Back
Top Bottom