|
-
November 17th, 2011, 05:54 PM
#1
HTML Capturing Enter key press
In short: I have a VBScript embedded in the Html file. I want that trigged when the user presses Enter in the field. There is no Server side part to this. All the code is local to the page.
Right now when the user types in a value, and presses enter, the field blanks out and thats it.
I'm having an unbelievably hard time trying to do this, and yet there is a ton of examples online on this.
This isn't the full script. It's just a shell of how it's laid out.
Code:
<HTML>
<HEAD>
<TITLE>Query Active Directory</TITLE>
</HEAD>
<SCRIPT LANGUAGE="VBScript">
Sub TestMe
MsgBox("Searching Active Directory")
End Sub
</SCRIPT>
<BODY>
<FORM NAME="Form1">
<input type="text" name="SearchAD">
<input type="submit" Value="Search">
</FORM>
</BODY>
</HTML>
What do I have to insert that'll allow me to trigger a VBScript when pressing Enter on the Text box field.
Last edited by PeejAvery; November 17th, 2011 at 06:55 PM.
Reason: Added code tags
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|