Checkbox Question

H

HartNA

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
 
R

Ray Costanzo [MVP]

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
 
H

HartNA

Thanks, exactly what I was looking for.

Ray Costanzo said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top