Form Problem

Discussion in 'JavaScript' started by larryweiss, Dec 12, 2006.

  1. #1
    Is it possible to set the value of two inputs using one select. The select could be a radio group or a drop down menu.

    What I am trying to do is to extend the paypal button capability.

    There is an input: "item_name"
    And another: "amount"

    If there were a select, say a drop down for:
    item "Model A" priced at $5
    item "Model B" priced at $6

    and the first item: item "Model A" priced at $5 were user selected

    would it be possible to put the value of "Model A" into "item_name"
    and the value of "Model B" into "amount"?

    I am barely able to read javascript. Can anyone offer me a fairly simple solution?
     
    larryweiss, Dec 12, 2006 IP
  2. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #2
    would it be possible to put the value of "Model A" into "item_name"
    and the value of "Model B" into "amount"?

    I get all of it but that, why would you wanna do that?
     
    krakjoe, Dec 12, 2006 IP
  3. larryweiss

    larryweiss Active Member

    Messages:
    84
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    73
    #3
    Suppose the drop down table is a list of mattress sizes.

    As the size increases so does the price. So one particular <option value="(whatever)">35 x 72 @ $122.50</option>

    would need to have "35 x 72" in the "item_name" and 122.5 in the "amount"
     
    larryweiss, Dec 12, 2006 IP