Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best way to do this?
Message
General information
Forum:
Internet
Category:
HTML
Miscellaneous
Thread ID:
00882291
Message ID:
00882320
Views:
12
You can do this with javascript like Tarran said.

But, you can also just delete the hidden "item_name" input and rename the listbox.
Each option must have a value like this:
<select size="1" name="item_name">
    <option value="Alabama 12-Pack Cooler">Alabama</option>
    <option value="Arkansas 12-Pack Cooler">Arkansas</option>
    <option value="Auburn 12-Pack Cooler">Auburn</option>
    ...
</select>
The form will work OK without any script if you move this list inside the form tags.

HTH :-)


>I have a web page with a drop-down combobox. It contains the names of colleges. When the user chooses a college name I need it to go into the HTML code further down on the same web page, a PayPal "Add To Cart" button to be exact.
>
>What's the best way to handle this?
>
>Here is the HTML code for the drop-down combobox immediately followed by the PayPal "Add to Cart" button HTML code.
>
>For example, here is the line of code I am trying to change:
>
<input type="hidden" name="item_name" value="12-Pack Cooler">
>
>Here is what I want the line of code to look like after they choose a college:
>
<input type="hidden" name="item_name" value="Michigan 12-Pack Cooler">
>
>The word "Michigan was inserted into the line of code. What's the best way to do this on the fly while the user is using the web page?
>
>Here is the HTML code for the drop-down combobox and the PayPal "Add to Cart" button on the same web page:
>
>
    <p align="left" style="margin-bottom: 0"><b><font face="Arial">Select Team:</font></b></p>
>    <p align="left"><select size="1" name="D1">
>    <option>Alabama</option>
>    <option>Arkansas</option>
>    <option>Auburn</option>
>    <option>Clemson</option>
>    <option>Duke</option>
>    <option>East Carolina</option>
>    <option>Florida</option>
>    <option>Florida State</option>
>    <option>Georgia</option>
>    <option>Indiana</option>
>    <option>Kansas</option>
>    <option>Kansas State</option>
>    <option>Kentucky</option>
>    <option>Louisiana State</option>
>    <option>Michigan</option>
>    <option>Michigan State</option>
>    <option>Mississippi</option>
>    <option>Mississippi State</option>
>    <option>Nebraska</option>
>    <option>North Carolina'</option>
>    <option>North Carolina State</option>
>    <option>Oklahoma</option>
>    <option>Tennessee</option>
>    <option>Texas</option>
>    <option>Virginia</option>
>    <option>Wisconsin</option>
>    </select></p>
>    <p><!--webbot bot="HTMLMarkup" startspan --><form name="_xclick" target="paypal" action="https://www.paypal.com" method="post">
><input type="hidden" name="cmd" value="_cart">
><input type="hidden" name="business" value="gocartoons@aol.com">
><input type="hidden" name="item_name" value="12-Pack Cooler">
><input type="hidden" name="amount" value="35.00">
><input type="image" src="http://www.paypal.com/en_US/i/btn/sc-but-01.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
><input type="hidden" name="add" value="1"> </form>
><!--webbot bot="HTMLMarkup" endspan --></p>
>
>Thanks for your help!
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform