Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Two combo boxes in a form to equal one description?

Reply
Thread Tools

Two combo boxes in a form to equal one description?

 
 
Charles B. Summers
Guest
Posts: n/a
 
      06-28-2004
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


 
Reply With Quote
 
 
 
 
Leif K-Brooks
Guest
Posts: n/a
 
      06-28-2004
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.
 
Reply With Quote
 
 
 
 
Mark Parnell
Guest
Posts: n/a
 
      06-28-2004
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
 
Reply With Quote
 
Charles Summers
Guest
Posts: n/a
 
      06-28-2004
Would you please give me an example? I'm very new at all of this!

Thanks!

"Mark Parnell" <(E-Mail Removed)> wrote in message
news:13yv5zcoqd1n2$(E-Mail Removed).. .
> 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



 
Reply With Quote
 
kayodeok
Guest
Posts: n/a
 
      06-28-2004
"Charles Summers" <(E-Mail Removed)> wrote in
news(E-Mail Removed):

> "Mark Parnell" <(E-Mail Removed)> wrote in
> message news:13yv5zcoqd1n2$(E-Mail Removed).. .
>> 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.../webdesign.htm
 
Reply With Quote
 
Leif K-Brooks
Guest
Posts: n/a
 
      06-28-2004
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.
 
Reply With Quote
 
kayodeok
Guest
Posts: n/a
 
      06-28-2004
Leif K-Brooks <(E-Mail Removed)> wrote in
news:(E-Mail Removed):

> 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.../webdesign.htm
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Internet Sharing: Equal upload speeds but un-equal download speeds =?Utf-8?B?TkpU?= Wireless Networking 3 09-15-2007 06:22 AM
How to reference one combo box from another combo box SM Javascript 2 04-28-2007 04:49 PM
Form validation and combo boxes ddog Javascript 2 11-22-2006 01:53 PM
Review: A.C.Ryan Backy™ Combo & SATA Combo Silverstrand Reviews & How-To's 0 06-20-2005 03:37 AM
Build a form - function - combo/select boxes? ASP General 4 08-10-2004 01:22 AM



Advertisments