|
|
|
|
|
| | |
|
Active Server Pages ASP ASP.NET .aspx .ascx Web HTML Developer Internet Microsoft Web Services Visual Studio .NET CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
Subject: |
Problems displaying checkbox status |
From: |
Vc Sekhar |
Date: |
1/11/2000 11:28:13 PM |
IP: |
209.217.123.6 |
I have a pretty lame ASP code that I am having problem with. I wonder if someone would be able to point out why it is not working. I am using
Windows 98 and the Personal Web Server that came with the system.
I want to use checkboxes to select one or more items out of a group of items. The problem I am having is with displaying the checked status in
the receiving program. When the boxes are checked the proper values are transmitted. However, when I use this value in an if then construct,
the if condition is always set to false.
Here are the two scripts.
Script1:
<title>checkbox status</title>
<form action="dealwithform.asp" method="POST">
<input type="checkbox" name="Name" value="Value1" >Value1
<input type="checkbox" name="Name" value="Value2" >Value2
<input type="checkbox" name="Name" value="Value3" >Value3
<input type="Submit" name="Submit" value="Submit">
<input type="reset">
</form>
Script2:
<TITLE>form2</TITLE>
<%
For Each Item in Request.Form
Response.Write (Item) %><BR>
<INPUT TYPE="text" NAME="Item" SIZE="20" MAXLENGTH="40" VALUE="
<% =Request.Form(Item) %>"><Br>
<% Next %>
<% If Name = "Value1" then %>
<input type="Checkbox" name="Name" Value ="Value1" checked > Value1
<%End If%>
<input type="Checkbox" name="Name"<% If Name<>"Value2" then %> checked
<%End If%>>Value2
<input type="Checkbox" name="Name" |
Follow Up - Re: Problems displaying checkbox status - Dave 1/26/2000 12:06:23 PM
|
|

|
|
|
|
|
|
|
|
|
|