Checkbox Question

Discussion in 'ASP General' started by HartNA, Feb 23, 2005.

  1. HartNA

    HartNA Guest

    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
     
    HartNA, Feb 23, 2005
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:%...
    > 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
    >
    >
    >
     
    Ray Costanzo [MVP], Feb 23, 2005
    #2
    1. Advertising

  3. HartNA

    HartNA Guest

    Thanks, exactly what I was looking for.

    "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
    message news:%...
    > 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" <> wrote in message
    > news:%...
    > > 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
    > >
    > >
    > >

    >
    >
     
    HartNA, Feb 23, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tshad
    Replies:
    0
    Views:
    565
    tshad
    Apr 15, 2005
  2. Vikram

    disable checkbox list checkbox

    Vikram, Jan 25, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    1,423
    ThunderMusic
    Jan 25, 2006
  3. =?Utf-8?B?RG90TmV0RGV2?=

    DataGrid and embeded Checkbox..How to find if checkbox clicked

    =?Utf-8?B?RG90TmV0RGV2?=, Oct 6, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    858
    David Wier
    Oct 6, 2006
  4. Jason Huang
    Replies:
    0
    Views:
    580
    Jason Huang
    Jun 29, 2007
  5. Joey Pang
    Replies:
    4
    Views:
    549
    Joey Pang
    Jun 13, 2005
Loading...

Share This Page