Creating Your Own HTAs
Try It Yourself: Add a Check Box to an HTA
Shows how to add a pair of check boxes to an HTA. This is the answer to a Try It Yourself exercise found in Part 2 of the introductory tutorial on creating HTAs.
<html>
<head>
<title>HTA Test</title>
<HTA:APPLICATION
ID="objTest"
APPLICATIONNAME="HTATest"
SCROLL="yes"
SINGLEINSTANCE="yes"
>
</head>
<SCRIPT LANGUAGE="VBScript">
Sub TestSub
If Checkbox1.Checked Then
Msgbox "You checked atl-dc-01."
End If
If Checkbox2.Checked Then
Msgbox "You checked atl-dc-02."
End If
End Sub
</SCRIPT>
<body>
<input type="checkbox" name="Checkbox1"> atl-dc-01<br>
<input type="checkbox" name="Checkbox2"> atl-dc-02<p>
<input id=runbutton class="button" type="button" value="Run" name="run_button" onClick="TestSub">
</body>