Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Oct 2003
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    change values to a paypal form

    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!!

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,646
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">

  • #3
    Regular Coder Vincent Puglia's Avatar
    Join Date
    Jul 2003
    Location
    where the World once stood
    Posts
    367
    Thanks
    0
    Thanked 13 Times in 13 Posts
    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
    Where the world once stood
    the blades of grass
    cut me still

  • #4
    New to the CF scene
    Join Date
    Oct 2003
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the advice. I used the paypal developers network and got what I needed. I didn't even know it existed.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •