| << F.6.3- Sample Option 01 - One Group | AppendixF | F.6.5- Sample Option 03 - Arranging Multiple Groups >> |
Sample Option 02 – Multiple Groups
We may want to present the user with more than one set of choices, for example first pick a shipping company, and then pick a level of service. All of the buttons in the first group should have the same name, and all of the options in the second group should have the same but different name. Then, within each group, the values of the buttons should be different. The request will hold one value equal to the first name and one value equal to the second name. The following code is from Option02Form.htm:
...
<BODY>
<H3>Option 02 Form - Multiple Groups</H3>
Please ship by:
<FORM ACTION="Option02Response.asp" METHOD=GET><HR>
<INPUT TYPE="RADIO" NAME=ShipComp VALUE="FedEx" CHECKED>
Federal Express<BR>
<INPUT TYPE="RADIO" NAME=ShipComp VALUE="UPS">
United Parcel Service - UPS<BR><HR>
<INPUT TYPE="RADIO" NAME=ShipSpeed VALUE="1" checked>
Overnight<BR>
<INPUT TYPE="RADIO" NAME=ShipSpeed VALUE="2">
Second Day<BR><HR>
<INPUT TYPE="SUBMIT" VALUE="Send My Data">
<INPUT TYPE="RESET" VALUE="Start Over">
</FORM></BODY>
...
|
And the result is:
|
|
The response page is Option02Response.asp:
...
<BODY>
<H3>Option 02 Response - Multiple Groups</H3>
<%
Response.Write "We will ship using the "
Select Case Request.QueryString("ShipComp")
Case "FedEx"
Response.Write "Federal Express"
Case "UPS"
Response.Write "United Parcel Service"
Case Else
Response.Write "Please contact the webMaster"
End Select
Response.Write " company with "
Select Case Request.QueryString("ShipSpeed")
Case "1"
Response.Write "Overnight service."
Case "2"
Response.Write "Second day Service."
Case Else
Response.Write "Please contact the webMaster"
End Select
%>
</BODY>
...
|
If the previous screen is submitted, the result is:
|
|
| << F.6.3- Sample Option 01 - One Group | AppendixF | F.6.5- Sample Option 03 - Arranging Multiple Groups >> |

RSS


