473,322 Members | 1,352 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Multiple checkbox data post to the another page

1
In this form checkbox. checked data post to the another page.

I couldn't find the error on this code please help me.
Expand|Select|Wrap|Line Numbers
  1. <script language="javascript">
  2.      function add_variation()
  3.      {
  4.             var arr = new Array();
  5.             $(".add_var").each(function()
  6.             {  
  7.                 if($(this).attr("checked"))
  8.                 {arr.push($(this).val());}
  9.             });
  10.  
  11.  
  12.             if(arr.length > 0)
  13.             {  $("#add_var_pid").val(arr); }
  14.             else
  15.             { alert("At least one product should be select");
  16.               $("#add_var_pid").val('');
  17.               return false;
  18.             }
  19.  
  20.      }
  21. </script>
  22.  
  23. <form name="addvar" id="addvar" method="post" action="/cart/verify.asp" onsubmit="return add_variation();">
  24.           <table width="580" border="0" align="center" cellpadding="0" cellspacing="0" style="BORDER: 1px #FFFFFF solid;">
  25.             <tr  bgcolor="#A48F50">
  26.               <td width="74%" height="18"class="PNameDetail"><b>Product Name</b></td>
  27.               <td bgcolor="#FFFFFF"  height="15"><img src="/images/spacer.gif" alt="gif img" width="2" /></td>
  28.               <td width="10%" height="18" align="center" class="PNameDetail"><b>Price</b></td>
  29.               <td bgcolor="#FFFFFF"  height="15"><img src="/images/spacer.gif" alt="gif img" width="2" /></td>
  30.               <td width="8%" height="18" align="center" class="PNameDetail"><b>Save</b></td>
  31.               <td bgcolor="#FFFFFF"  height="15"><img src="/images/spacer.gif" alt="gif img" width="2" /></td>
  32.               <td width="8%" height="18" align="center" class="PNameDetail"><b>Select</b></td>
  33.             </tr>
  34.             <%
  35.                             While Not RsProductVariation.EOF
  36.                                 If bgcolor = "#F7F6FE" Then bgcolor = "#E7E4F7" Else bgcolor = "#F7F6FE"
  37.                                 ProductNameFormat = ProductName
  38.                                 If Len(RsProductVariation("Potency")) > 0 Then ProductNameFormat = ProductNameFormat & " " & RsProductVariation("Potency")
  39.                                 If Len(RsProductVariation("Flavour")) > 0 Then ProductNameFormat = ProductNameFormat & " " & RsProductVariation("Flavour") %>
  40.             <tr  bgcolor="<%=bgcolor%>">
  41.               <td width="74%" class="pd-productvariation">&nbsp;<a href="<%=GetISAPI(RsProductVariation("PID")  & "|" &  RsProductVariation("Name"),"product")%>" rel="nofollow"><%=ProductNameFormat%>&nbsp;<%=RsProductVariation("Quantity")%></a></td>
  42.               <td bgcolor="#FFFFFF" height="20"><img src="/images/spacer.gif" alt="gif img" width="2" /></td>
  43.               <td width="10%" class="pd-productvariation" align="center"><%=FormatCurrency(RsProductVariation("Price"), 2)%></td>
  44.               <td bgcolor="#FFFFFF" height="20"><img src="/images/spacer.gif" alt="gif img" width="2" /></td>
  45.               <td width="8%" class="pd-productvariation" align="center"><%=Round(((( RsProductVariation("MSRP")-RsProductVariation("Price") )/RsProductVariation("MSRP")) * 100),0)%>%</td>
  46.               <td bgcolor="#FFFFFF" height="20"><img src="/images/spacer.gif" alt="gif img" width="2" /></td>
  47.               <td width="8%" align="center"><input name="add_var" id="add_var" type="checkbox" class="add_var" value="<%=Rs("PID")%>"/></td>
  48.             </tr>
  49.             <%
  50.                                 RsProductVariation.MoveNext
  51.                                 Wend%>
  52.           </table>
  53.           </td>
  54.  
  55.           </tr>
  56.  
  57.           <tr>
  58.             <td width="58" align="right">&nbsp;
  59.               <input type="image"  name="img" value="img" src="/images/pdetail-addtocart.png" align="bottom" />
  60.               <input type="hidden" name="add_var_pid" id="add_var_pid" value="" /></td>
  61.           </tr>
  62.           <tr>
  63.             <td height="10" style="border-left:1px solid #CCCCCC; border-right:1px solid #CCCCCC"></td>
  64.           </tr>
  65.         </form>
  66.  
Jul 25 '12 #1
1 1729
Dormilich
8,658 Expert Mod 8TB
what error?

how does ASP handle multiple URL parameters of the same name?
Jul 25 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: cliff | last post by:
I am in the process of developing an application and would like to hide the query strings in the URLs. I want to POST data to a page then validate the data. If there is an error I have to send data...
4
by: Bee | last post by:
Hi everyone, I'm having trouble accessing a Mysql database containing checkbox data that is posted from a form. I use the serialize function to store the checkbox values in an array (in a column...
1
by: Michał Januszczyk | last post by:
I have the following code on my aspx page <%if(user_status==1){%><ctl:state1 runat="server" id="aaa"></ctl:state1><%}else if(user_status==2){%><ctl:state2 runat="server"...
5
by: rbragg | last post by:
All of my other form data is stored correctly in the db except for my checkbox data. This column in my table is empty. I have this checkbox group on my form: <input name="cbItems"...
35
by: mudgilgaurav | last post by:
Hi I have multiple checkboxes on my page and i want to access only the selected checkbox on the next page can any one give me the idea how to do it Thnx in advance Bye
0
by: TechnoAtif | last post by:
<?php include "dbconnect.php"; include "commonFunc.php"; ?> <!----------------------------------> <table width="80%" border="1" cellpadding="2" cellspacing="0"> <tr > <td...
16
by: manius | last post by:
Hi. How do I insert in a db multiple checkbox results? I have 11 checkboxes, so how to do it in one query? Please :P
11
by: TechnoAtif | last post by:
INSERT AND UPDATE MULTIPLE CHECKBOX DATA USING PHPMYSQL OR JAVASCRIPT Hi All I want to check the multiple checkboxes update them after revisiting that page. I am taking the name as...
0
by: Mary arilene | last post by:
Hi, I currenlt building a form and would like some help validating multiple checkboxes and receiving values. I'm using two two pages there asp pages. HTML code(with the body tag) ...
1
by: Raywin | last post by:
Hello everyone, i am facing a problem with multiple checkbox. I have set few checkbox as a selection, then send to database for search result. For example the checkbox including hotel features...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.