Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Shows how to add radio buttons 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
For Each objButton in RadioOption
If objButton.Checked Then
Msgbox "You selected " & objButton.Value & "."
End If
Next
End Sub
</SCRIPT>
<body>
<input type="radio" name="RadioOption" value="atl-dc-01">atl-dc-01<BR>
<input type="radio" name="RadioOption" value="atl-dc-02">atl-dc-02<BR>
<input type="radio" name="RadioOption" value="atl-dc-03">atl-dc-03<P>
<input id=runbutton class="button" type="button" value="Run Script" name="run_button" onClick="TestSub">
</body>