...

View Full Version : change values to a paypal form



coolfashionchic
10-02-2003, 07:21 PM
I have spent some time away from javascript (like 2 years) and have forgotten how to do a few things, actually most things. I am desperately in need to completing my shopping cart for my clothing design business.

This is what I want I'm wanting to do. I have an item (e.g., clothing#1), with this selection you can choose from 4 sizes, then from 4 lace selections, then from 12 painted designs. I want to create a value for my paypal shopping cart by combining each selections value:

<input type="hidden" name="item_number" value="xxxxx">

I also need to create a value for the amount. This will be one of two options. One price will be designated for an item with a painted design and another for one without.

<input type="hidden" name="amount" value="xxxxx">

I just can't remember how to do it. I have just spent 2 hours looking through my old books and can't find it anywhere. Please help!!:confused:

zoobie
10-03-2003, 02:19 AM
You'll need arrays to cover every possible combination of course...Better ask here because there may be a more efficient way to do this:
Paypal Developers Network (http://www.paypaldev.org/default.asp)

Vincent Puglia
10-03-2003, 03:50 AM
Hi,

Maybe I'm confused, but what's wrong with concatenating the selected options' values?

<select name='a'...>
<option value='1'>Clothing1</option>

<select name='b'...>
<option value='1'>Lace1</option>

<select name='c'...>
<option value='1'>Size 4</option>

<select name='d'...>
<option value='1'>Design1</option>

formObj = document.formname;
value = formObj.a.options[a.selectedIndex].value + formObj.b.options[b.selectedIndex].value + formObj.c.options[c.selectedIndex].value + formObj.d.options[d.selectedIndex].value;

Vinny

coolfashionchic
10-03-2003, 07:10 PM
Thanks for the advice. I used the paypal developers network and got what I needed. I didn't even know it existed.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum