I have a vbs file that runs a .hta with two radio buttons. My objective is to capture the selection made in the .hta and bring it back to the vbs to use it as a variable for a drive mapping.
The vbs has
The GSServer should equal whatever is selected in the .hta.
Here's the .hta:
So how do I get the radio button selected and bring it back into the vbs file that runs the .hta?
The vbs has
Code:
Set WSHNetwork = CreateObject("WScript.Network")
WSHNetwork.MapNetworkDrive "Z:", "\\" & GSServer & "\goldapp$",True
The GSServer should equal whatever is selected in the .hta.
Here's the .hta:
Code:
<SCRIPT LANGUAGE="VBScript">
Sub RunScript
If ComputerOption(0).Checked Then
strComputer = ComputerOption(0).Value
End If
If ComputerOption(1).Checked Then
strComputer = ComputerOption(1).Value
End If
If strComputer = "" Then
Exit Sub
End If
End Sub
Sub CancelScript
Self.Close()
End Sub
</SCRIPT>
<BODY>
<input type="radio" name="ComputerOption" value="GOLD">GOLD<BR>
<input type="radio" name="ComputerOption" value="GSPROD">GSPROD<P>
<input id=runbutton class="button" type="button" value="Run Script" name="ok_button"
onClick="RunScript">
<input id=runbutton class="button" type="button" value="Cancel" name="cancel_button"
onClick="CancelScript">
</BODY>
So how do I get the radio button selected and bring it back into the vbs file that runs the .hta?