Two combo boxes in a form to equal one description?

Discussion in 'HTML' started by Charles B. Summers, Jun 28, 2004.

  1. I need to take the values of two select boxes and have the results submitted
    in a value named "ItemDesc". Is this possible? Our Merchant Account's built
    in shopping cart only allows one Item Description per line, so what I need
    to do is to combine the two selects to append to each other as "ItemDesc"

    Here my code so far.

    <form method="post"
    action="http://www.eProcessingNetwork.Com/carts/AddToCart.pl">
    Qty:
    <input type="text" size="3" name="ItemQty" value="0">
    <SELECT name="ItemDesc">
    <option value="0" selected>Select</option>
    <option value="019-103-MK">White Shiner</option>
    <option value="019-107-MK">Silver Shiner</option>
    <option value="019-115-MK">Baby Bass</option>
    <option value="019-125-MK">Chartreuse w/Blue Back</option>
    <option value="019-202-MK">Golden Shadow</option>
    <option value="019-208-MK">Chartreuse Shiner</option>
    <option value="019-210-MK">Chartreuse &amp; White</option>
    <option value="019-214-MK">Firetiger</option>
    </SELECT>
    <select name="Item Desc">
    <option value="Double Colorado">Double Colorado</option>
    <option value="Double Willowleaf">Double Willowleaf</option>
    <option value="Tandem Willowleaf">Tandem Willowleaf</option>
    <option value="Tandem Indiana">Tandem Indiana</option>
    <option value="Tandem Turtleback">Tandem Turtleback</option>
    </select>
    <input type="hidden" name="ItemCost" value="10.99">
    <input type="hidden" name="ePNAccount" value="05971">
    <input type="hidden" name="ReturnToURL"
    value="http://www.secretweaponlures.com/newsite/form1.htm">
    <input type="hidden" name="ReturnApprovedURL"
    value="http://www.secretweaponlures.com/newsite/form1.htm">
    <input type="hidden" name="ReturnDeclinedURL"
    value="http://www.secretweaponlures.com/dreamweaver/oops.htm">
    <input type="submit" name="Submit" value="Add To Cart">

    Naming them both ItemDesc didn't work, and only included the first select,
    not the second one.
    Thank You very much for your help!
    --
    Charles Summers
    Secret Weapon Lures
    http://www.secretweaponlures.com
    Charles B. Summers, Jun 28, 2004
    #1
    1. Advertising

  2. Charles B. Summers wrote:
    > I need to take the values of two select boxes and have the results submitted
    > in a value named "ItemDesc".


    Have your server-side script do that. You can't do it client-side.
    Leif K-Brooks, Jun 28, 2004
    #2
    1. Advertising

  3. Charles B. Summers

    Mark Parnell Guest

    On Sun, 27 Jun 2004 22:13:43 -0500, "Charles B. Summers" <cbsummers@>
    declared in alt.html:

    > I need to take the values of two select boxes and have the results submitted
    > in a value named "ItemDesc".


    Get your form handler script to combine them.

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
    "Never drink rum&coke whilst reading usenet" - rf 2004
    Mark Parnell, Jun 28, 2004
    #3
  4. Would you please give me an example? I'm very new at all of this!

    Thanks!

    "Mark Parnell" <> wrote in message
    news:13yv5zcoqd1n2$...
    > On Sun, 27 Jun 2004 22:13:43 -0500, "Charles B. Summers" <cbsummers@>
    > declared in alt.html:
    >
    > > I need to take the values of two select boxes and have the results

    submitted
    > > in a value named "ItemDesc".

    >
    > Get your form handler script to combine them.
    >
    > --
    > Mark Parnell
    > http://www.clarkecomputers.com.au
    > "Never drink rum&coke whilst reading usenet" - rf 2004
    Charles Summers, Jun 28, 2004
    #4
  5. Charles B. Summers

    kayodeok Guest

    "Charles Summers" <> wrote in
    news:D:

    > "Mark Parnell" <> wrote in
    > message news:13yv5zcoqd1n2$...
    >> On Sun, 27 Jun 2004 22:13:43 -0500, "Charles B. Summers"
    >> <cbsummers@> declared in alt.html:
    >>
    >> > I need to take the values of two select boxes and have the
    >> > results

    > submitted
    >> > in a value named "ItemDesc".

    >>
    >> Get your form handler script to combine them.
    >>

    > Would you please give me an example? I'm very new at all of
    > this!
    >
    > Thanks!
    >


    If I understand this correctly, it is a matter of joining the two
    strings in your favorite server side language

    (This is generic)

    $ItemDesc = $ItemDesc1 . " " . $ItemDesc2

    $ItemDescr1 is your first Combo Box
    $ItemDescr2 is your second Combo Box

    or am I missing something?

    --
    Kayode Okeyode
    http://www.kayodeok.co.uk/weblog/
    http://www.kayodeok.btinternet.co.uk/favorites/webdesign.htm
    kayodeok, Jun 28, 2004
    #5
  6. kayodeok wrote:
    > If I understand this correctly, it is a matter of joining the two
    > strings in your favorite server side language
    >
    > (This is generic)
    >
    > $ItemDesc = $ItemDesc1 . " " . $ItemDesc2


    If you mean that your code snippet is generic to all server-side
    languages, it isn't. It will work in PHP with register_globals on, and
    Perl if you happen to have assigned $ItemDesc1 and $ItemDesc2, but
    that's about it.

    But I've probably misunderstood you, and you're saying that it's generic
    to something else.
    Leif K-Brooks, Jun 28, 2004
    #6
  7. Charles B. Summers

    kayodeok Guest

    Leif K-Brooks <> wrote in
    news::

    > kayodeok wrote:
    >> If I understand this correctly, it is a matter of joining the
    >> two strings in your favorite server side language
    >>
    >> (This is generic)
    >>
    >> $ItemDesc = $ItemDesc1 . " " . $ItemDesc2

    >
    > If you mean that your code snippet is generic to all server-side
    > languages, it isn't. It will work in PHP with register_globals
    > on, and Perl if you happen to have assigned $ItemDesc1 and
    > $ItemDesc2, but that's about it.
    >
    > But I've probably misunderstood you, and you're saying that it's
    > generic to something else.
    >


    Actually, I was referring to the idea that he needs to join to
    strings as generic.

    And I did mention that $ItemDesc1 refers to the first combo box (I
    know he named it as $ItemDesc but then he named both as $ItemDesc)

    And I know that in PHP it should be

    $ItemDesc = $_POST["ItemDesc1"] . " " . $_POST["ItemDesc2"]

    I hope this clarifies my original post

    --
    Kayode Okeyode
    http://www.kayodeok.co.uk/weblog/
    http://www.kayodeok.btinternet.co.uk/favorites/webdesign.htm
    kayodeok, Jun 28, 2004
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mithun Verma

    Combo Boxes in Crystal Reports

    Mithun Verma, Jul 5, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    458
    Mithun Verma
    Jul 5, 2003
  2. Guest
    Replies:
    4
    Views:
    190
    Bullschmidt
    Aug 10, 2004
  3. dthmtlgod

    Fill Combo Box based on another Combo Box

    dthmtlgod, Nov 16, 2005, in forum: ASP General
    Replies:
    1
    Views:
    587
    Bob Barrows [MVP]
    Nov 16, 2005
  4. ddog

    Form validation and combo boxes

    ddog, Nov 22, 2006, in forum: Javascript
    Replies:
    2
    Views:
    153
  5. SM
    Replies:
    2
    Views:
    364
Loading...

Share This Page