I am creating a small form page using HTML and using VBScript to perform some actions using the data entered in the form.
The form contains 4 Radio Buttons to allow the selection of a server - HTMOA1, LONOA1, LONOA4, DUK0A1.
I have added the VBScript Sub Routine that is called when one of the Radio Button is selected. It sets a variable named 'server'. I know this works as I added a MsgBox command to my script to display the value of the radio button selected.
My problem is, that once all the entries in the form are completed and the Submit button clicked, another VBScript routine runs to perform specified actions. One of the actions should use the 'server' variable set when the Radio Button for Server Name is selected. It seem that this variable is no longer available or recognized.
Here's the code for the radio buttons and some of the form.
<INPUT TYPE= "RADIO" NAME= "typeServer" LANGUAGE= "VBScript"
OnClick= "SetServer('HTMOA3')" value="13" checked>
<font face="Arial">HTMOA3 (Swan Valley)
<INPUT TYPE= "RADIO" NAME= "typeServer" LANGUAGE= "VBScript"
OnClick= "SetServer('LONOA1')" value="12">LONOA1 (LMS)
<INPUT TYPE= "RADIO" NAME= "typeServer" LANGUAGE= "VBScript"
OnClick= "SetServer('LONOA4')" value="2">LONOA4 (Flagship)
<INPUT TYPE= "RADIO" NAME= "typeServer" LANGUAGE= "VBScript"
OnClick= "SetServer('DUKOA1')" value="3">DUKOA1 (Dockers)</font></BLOCKQUOTE>
<!--
Dim Server
Sub SetServer (Server)
MsgBox (Server)
End Sub
-->
</SCRIPT><BLOCKQUOTE><BLOCKQUOTE> <SCRIPT LANGUAGE ="VBScript">
<!--
Sub Button1_OnClick
MsgBox (Server)
This is not the code that I want to appear after the Sub Button1_OnClick, but effectively it is at this point that I want to reference the 'server variable' set by the radio button and use this variable at several different stages in the VBScript. The MsgBox just produces an empty box at present.
Any ideas how I can select the radio button and have the 'server variable available at any stage rather than just in the Sub SetServer sub routine?
Thanks.
The form contains 4 Radio Buttons to allow the selection of a server - HTMOA1, LONOA1, LONOA4, DUK0A1.
I have added the VBScript Sub Routine that is called when one of the Radio Button is selected. It sets a variable named 'server'. I know this works as I added a MsgBox command to my script to display the value of the radio button selected.
My problem is, that once all the entries in the form are completed and the Submit button clicked, another VBScript routine runs to perform specified actions. One of the actions should use the 'server' variable set when the Radio Button for Server Name is selected. It seem that this variable is no longer available or recognized.
Here's the code for the radio buttons and some of the form.
<INPUT TYPE= "RADIO" NAME= "typeServer" LANGUAGE= "VBScript"
OnClick= "SetServer('HTMOA3')" value="13" checked>
<font face="Arial">HTMOA3 (Swan Valley)
<INPUT TYPE= "RADIO" NAME= "typeServer" LANGUAGE= "VBScript"
OnClick= "SetServer('LONOA1')" value="12">LONOA1 (LMS)
<INPUT TYPE= "RADIO" NAME= "typeServer" LANGUAGE= "VBScript"
OnClick= "SetServer('LONOA4')" value="2">LONOA4 (Flagship)
<INPUT TYPE= "RADIO" NAME= "typeServer" LANGUAGE= "VBScript"
OnClick= "SetServer('DUKOA1')" value="3">DUKOA1 (Dockers)</font></BLOCKQUOTE>
<!--
Dim Server
Sub SetServer (Server)
MsgBox (Server)
End Sub
-->
</SCRIPT><BLOCKQUOTE><BLOCKQUOTE> <SCRIPT LANGUAGE ="VBScript">
<!--
Sub Button1_OnClick
MsgBox (Server)
This is not the code that I want to appear after the Sub Button1_OnClick, but effectively it is at this point that I want to reference the 'server variable' set by the radio button and use this variable at several different stages in the VBScript. The MsgBox just produces an empty box at present.
Any ideas how I can select the radio button and have the 'server variable available at any stage rather than just in the Sub SetServer sub routine?
Thanks.