Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Checkbox Question

Reply
Thread Tools

Checkbox Question

 
 
HartNA
Guest
Posts: n/a
 
      02-23-2005
I have a script that will work on it is own, but the problem is the site I
am trying to implement the checkbox on a site with attachments on the same
form. In my testing I check LOW. The result I am looking for is YES, but
it keeps coming up NO

Here is a snippet from the HTML code

<form enctype="multipart/form-data" action="helpsoft_process.asp"
method="POST">
<td align=center width="150" class="pbMain_data3"><input type="checkbox"
name="prLow" value="">Low</td>
<td align=center width="150" class="pbMain_data3"><input type="checkbox"
name="prMed" value="">Med</td>
<td align=center width="150" class="pbMain_data3"><input type="checkbox"
name="prHigh" value="">High</td>
<td align=center width="150" class="pbMain_data3"><input type="checkbox"
name="prCrit" value="">Critical</td>

Here is a code from the ASP page

Dim mySmartUpload, intCount, Conn, RS
Set mySmartUpload = Server.CreateObject("aspSmartUpload.SmartUpload")
mySmartUpload.Upload

pLow = mySmartUpload.form("prLow")
pMed = mySmartUpload.form("prMed")
pHigh = mySmartUpload.form("prHigh")
pCrit = mySmartUpload.form("prCrit")

If mySmartUpLoad.Form("prLow") = "on" Then
Response.Write "yes"
else
Response.write "no"
End If



 
Reply With Quote
 
 
 
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      02-23-2005
Give your checkboxes the same name, and then unique values as such:

<form enctype="multipart/form-data" action="helpsoft_process.asp"
method="POST">


<td align=center width="150" class="pbMain_data3"><input type="checkbox"
name="chkUrgency" value="Low">Low</td>
<td align=center width="150" class="pbMain_data3"><input type="checkbox"
name="chkUrgency" value="Med">Med</td>
<td align=center width="150" class="pbMain_data3"><input type="checkbox"
name="chkUrgency" value="High">High</td>
<td align=center width="150" class="pbMain_data3"><input type="checkbox"
name="chkUrgency" value="Critical">Critical</td>
<input type="submit">
<%
set mySmartUpload = Request

sUrgency = mySmartUpload.form("chkUrgency")
Response.Write sUrgency

%>

Ray at work

"HartNA" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> I have a script that will work on it is own, but the problem is the site I
> am trying to implement the checkbox on a site with attachments on the same
> form. In my testing I check LOW. The result I am looking for is YES, but
> it keeps coming up NO
>
> Here is a snippet from the HTML code
>
> <form enctype="multipart/form-data" action="helpsoft_process.asp"
> method="POST">
> <td align=center width="150" class="pbMain_data3"><input type="checkbox"
> name="prLow" value="">Low</td>
> <td align=center width="150" class="pbMain_data3"><input type="checkbox"
> name="prMed" value="">Med</td>
> <td align=center width="150" class="pbMain_data3"><input type="checkbox"
> name="prHigh" value="">High</td>
> <td align=center width="150" class="pbMain_data3"><input type="checkbox"
> name="prCrit" value="">Critical</td>
>
> Here is a code from the ASP page
>
> Dim mySmartUpload, intCount, Conn, RS
> Set mySmartUpload = Server.CreateObject("aspSmartUpload.SmartUpload")
> mySmartUpload.Upload
>
> pLow = mySmartUpload.form("prLow")
> pMed = mySmartUpload.form("prMed")
> pHigh = mySmartUpload.form("prHigh")
> pCrit = mySmartUpload.form("prCrit")
>
> If mySmartUpLoad.Form("prLow") = "on" Then
> Response.Write "yes"
> else
> Response.write "no"
> End If
>
>
>



 
Reply With Quote
 
 
 
 
HartNA
Guest
Posts: n/a
 
      02-23-2005
Thanks, exactly what I was looking for.

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:%(E-Mail Removed)...
> Give your checkboxes the same name, and then unique values as such:
>
> <form enctype="multipart/form-data" action="helpsoft_process.asp"
> method="POST">
>
>
> <td align=center width="150" class="pbMain_data3"><input type="checkbox"
> name="chkUrgency" value="Low">Low</td>
> <td align=center width="150" class="pbMain_data3"><input type="checkbox"
> name="chkUrgency" value="Med">Med</td>
> <td align=center width="150" class="pbMain_data3"><input type="checkbox"
> name="chkUrgency" value="High">High</td>
> <td align=center width="150" class="pbMain_data3"><input type="checkbox"
> name="chkUrgency" value="Critical">Critical</td>
> <input type="submit">
> <%
> set mySmartUpload = Request
>
> sUrgency = mySmartUpload.form("chkUrgency")
> Response.Write sUrgency
>
> %>
>
> Ray at work
>
> "HartNA" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > I have a script that will work on it is own, but the problem is the site

I
> > am trying to implement the checkbox on a site with attachments on the

same
> > form. In my testing I check LOW. The result I am looking for is YES,

but
> > it keeps coming up NO
> >
> > Here is a snippet from the HTML code
> >
> > <form enctype="multipart/form-data" action="helpsoft_process.asp"
> > method="POST">
> > <td align=center width="150" class="pbMain_data3"><input type="checkbox"
> > name="prLow" value="">Low</td>
> > <td align=center width="150" class="pbMain_data3"><input type="checkbox"
> > name="prMed" value="">Med</td>
> > <td align=center width="150" class="pbMain_data3"><input type="checkbox"
> > name="prHigh" value="">High</td>
> > <td align=center width="150" class="pbMain_data3"><input type="checkbox"
> > name="prCrit" value="">Critical</td>
> >
> > Here is a code from the ASP page
> >
> > Dim mySmartUpload, intCount, Conn, RS
> > Set mySmartUpload = Server.CreateObject("aspSmartUpload.SmartUpload")
> > mySmartUpload.Upload
> >
> > pLow = mySmartUpload.form("prLow")
> > pMed = mySmartUpload.form("prMed")
> > pHigh = mySmartUpload.form("prHigh")
> > pCrit = mySmartUpload.form("prCrit")
> >
> > If mySmartUpLoad.Form("prLow") = "on" Then
> > Response.Write "yes"
> > else
> > Response.write "no"
> > End If
> >
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASPNET CheckBox and a CheckBox in a TemplateField Jason Huang ASP .Net 0 06-29-2007 12:35 AM
DataGrid and embeded Checkbox..How to find if checkbox clicked =?Utf-8?B?RG90TmV0RGV2?= ASP .Net 1 10-06-2006 04:11 PM
disable checkbox list checkbox Vikram ASP .Net 1 01-25-2006 02:59 PM
Howto bind CheckBox to the datagrid/ Then update the database field when the checkbox is clicked. Joey Pang ASP .Net Datagrid Control 4 06-13-2005 02:29 AM
Text on Checkbox below the checkbox tshad ASP .Net 0 04-14-2005 11:26 PM



Advertisments