Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do i detect a keypress in vbscript from a text box in a html form

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
how do i detect a keypress in vbscript from a text box in a html form
 
Similar problem to:

/www.zdnet.com/devhead/stories/articles/0,4413,2141170,00.html

you'll find your answer there.

good luck
===================
* Marta Oliveira *
===================
marta100@aeiou.pt
-------------------
CPC_TA- Braga
-------------------
Portugal
===================
 
Here's a brief sample:
Code:
<HTML>
<HEAD>
<TITLE></TITLE>
<SCRIPT language=VBScript>
Sub text1_onkeypress()
	MsgBox CStr(window.event.keyCode)
End Sub
</SCRIPT>
</HEAD>
<BODY>
<P><INPUT id=text1 name=text1></P>
</BODY>
</HTML>
Note that not every keypress will be detectable by this means - TAB in particular gives me fits on this (somebody hold my tongue!).

See also the definitive resource on this at:

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top