javascript - Paypal not picking up selection choices -


i have created script partial season ticket package sales on music group's website. user select 4 concert programs , select date each concert program selected. of these selections need post paypal processing/purchasing. "add cart" button route paypal, concert programs , dates not being picked up. box office people need information. can see code have here: http://jsfiddle.net/saraswati/v6pur/66/

here html:

<form target="paypal" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post"><strong><a name="partial">partial</a> subscription (4 concerts), regular price: $87.00 (a savings of 13%)</strong> <input type="hidden" name="cmd" value="_cart"> <input type="hidden" name="add" value="1"> <input type="hidden" name="business" value="temp_1344946752_biz@me.com"> <input type="hidden" name="item_name" value="partial subscription (4 concerts), regular price"> <input type="hidden" name="amount" value="87.00"> <input type="hidden" name="currency_code" value="usd">  <table width="90%" cellspacing="0" cellpadding="0" border="1"> <caption>please select desired concert program , desired date pull-down menus. click "add cart" button.</caption>  <tr id="row1" align=center> <td><font color="#990000">concert 1:</font></td> <td><font color="#990000">concert 2:</font></td> <td><font color="#990000">concert 3:</font></td> <td><font color="#990000">concert 4:</font></td> </tr> <tr id=row2> <td><input type="hidden" name="os0" value="concert 1"><body onload="changedatedroplist ();">        <select id="program1" onchange="changedatedroplist(1);">          <option value="" selected="selected">select program</option>          <option value="tudors">the tudors</option>          <option value="noches">noches, noches</option>          <option value="christmas">christmas eurotour</option>          <option value="celtic">celtic trinity</option>         <option value="unrequited">unrequited love</option>         <option value="secret">secret no more</option>      </select>       <select id="date1">      </select>  </body> </td>  <td><input type="hidden" name="os1" value="concert 2"><body onload="changedatedroplist ();">        <select id="program2" onchange="changedatedroplist(2);">          <option value="" selected="selected">select program</option>          <option value="tudors">the tudors</option>          <option value="noches">noches, noches</option>          <option value="christmas">christmas eurotour</option>          <option value="celtic">celtic trinity</option>         <option value="unrequited">unrequited love</option>         <option value="secret">secret no more</option>      </select>       <select id="date2">      </select> </body>  </td>  <td><input type="hidden" name="os2" value="concert 3"><body onload="changedatedroplist ();">        <select id="program3" onchange="changedatedroplist(3);">          <option value="" selected="selected">select program</option>          <option value="tudors">the tudors</option>          <option value="noches">noches, noches</option>          <option value="christmas">christmas eurotour</option>          <option value="celtic">celtic trinity</option>         <option value="unrequited">unrequited love</option>         <option value="secret">secret no more</option>      </select>       <select id="date3">      </select>  </body> </td>  <td><input type="hidden" name="os3" value="concert 4"><body onload="changedatedroplist ();">        <select id="program4" onchange="changedatedroplist(4);">          <option value="" selected="selected">select program</option>          <option value="tudors">the tudors</option>          <option value="noches">noches, noches</option>          <option value="christmas">christmas eurotour</option>          <option value="celtic">celtic trinity</option>         <option value="unrequited">unrequited love</option>         <option value="secret">secret no more</option>      </select>       <select id="date4">      </select>  </body> </td> </tr> </table> <br> <center> <input type="image" src="https://www.paypalobjects.com/en_us/i/btn/btn_cart_lg.gif" border="0" name="submit" alt="paypal - safer, easier way pay online!"> <img alt="" border="0" src="https://www.paypalobjects.com/en_us/i/scr/pixel.gif" width="1" height="1"> </form> </center> 

and here javascript:

 var progamsanddates = {};     progamsanddates.tudors = ['sept. 15', 'sept. 16'];     progamsanddates.noches = ['oct. 20', 'oct. 21'];     progamsanddates.christmas = ['dec. 14', 'dec. 15', 'dec. 16'];     progamsanddates.celtic = ['jan. 26', 'jan. 27'];     progamsanddates.unrequited = ['mar. 02', 'mar. 03'];     progamsanddates.secret = ['apr. 20', 'apr. 21'];      function changedatedroplist (id) {           var programdroplist = document.getelementbyid ("program"+id);         var datedroplist = document.getelementbyid ("date"+id);         var selprogram = programdroplist.options[programdroplist.selectedindex].value;          // remove dates         while (datedroplist.options.length) {             datedroplist.remove (0);         }          // add new dates         var dates = progamsanddates[selprogram];         if (dates) {             (var i=0; < dates.length; i++) {                 var date = new option (dates[i], i);                 datedroplist.options.add (date);             }         }     }  

again, when click on "add cart" button, goes paypal , description reads "partial subscription (4 concerts), regular price" , picks item price, etc. however, description should show selections, such "tudors, sept. 15; celtic, jan.27; etc." query wisdom of in getting work. thank you!

the variables passing on not correct. passing on variables such on0, os0, on1, os1. these correct add cart buttons or buy buttons, since using cart upload method need passed on on0_1, os0_1, on1_2, , os1_2. correct issue, , should show up.

<form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_cart"> <input type="hidden" name="upload" value="1"> <input type="hidden" name="business" value="my_email@my_site.com">  <input type="hidden" name="item_name_1" value="football t-shirt"> <input type="hidden" name="amount_1" value="1.00"> <input type="hidden" name="on0_1" value="color"> <input type="hidden" name="os0_1" value="red"> <input type="hidden" name="on1_1" value="size"> <input type="hidden" name="os1_1" value="small">  <input type="hidden" name="item_name_2" value="notebook"> <input type="hidden" name="amount_2" value="2.00"> <input type="hidden" name="on0_2" value="number of pages"> <input type="hidden" name="os0_2" value="200"> <input type="hidden" name="on1_2" value="type"> <input type="hidden" name="os1_2" value="3 ring">  <input type="submit" value="paypal"> </form> 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -