Returns or sets a Variant that represents the value associated with the onkeyup event. For example, the Variant can represent a macro or procedure call that executes when the event has occurred. Read/write.
expression.onkeyup
expression Required. An expression that returns a DispFPHTMLDocument object.
The following example, which appears embedded in the <head> section of an HTML document, displays a message to the user when the user presses and releases a key within the current <form> element containing the onkeyup="DisplayMessage" attribute in the current page.
<head>
<title>onkeyup Example</title>
<script id=clientEventHandlersVBS language=vbscript>
<!--
Sub DisplayMessage
'Displays message to user
MsgBox "This message is displayed when the user releases a key within the <form> element in the current document."
End Sub
-->
</script>
</head>
The <form> section code below calls the DisplayMessage procedure located in the < head> section of the document. When the user releases a key within the <form> element in the document, a message will be displayed.
<form method="POST" action="--WEBBOT-SELF--">
<!--webbot bot="SaveResults" U-File="_private/form_results.csv" S-Format="TEXT/CSV"
S-Label-Fields="TRUE" --><p onkeyup="DisplayMessage">
<input type="text" name="T1" size="20"><input type="submit" value="Submit"
name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>
The following line of code sets the onkeyup attribute to the DisplayMessage procedure call. The index value zero (0) denotes the <form> tag as the first <form> element in the current page and the first <form> element in the all collection.
ActiveDocument.body.all.tags("form").item(0).onkeyup = "Display Message"