PDA

View Full Version : Non Flash Related Coding Help


GnAProductions
02-13-2008, 06:21 PM
Hey Everyine, I have a peice of code here, for a dropdown box, to add a product to a shopping cart. It use to work in the past, but doesnt now. :eek:

Its sitting on an HTML page, then goes into a dynamic shopping cart. Below is the code.

<form action="https://secure.unicity.net/unicityusa/ShoppingCart/Shop.cfm?&amp;Country=USA&amp;LNG=eng&amp;AddItem=" method="get" id="shopform">
<select name="select4" class="product_description">
<option value="22365">Item# 22365 / Caplets / $39.00</option>
<option value="13672">Item# 13672 / Packets / $33.00</option>
</select>
<input name="image4" type="image" onmousedown="document.getElementById('shopform').submit()" src="images/add_to_cart.jpg" width="72" height="15" />
</form>

Now, It worked in the past. But for somereason, it doesnt anymore.

Its suppose to work like this thing here, and just add the item to the persons shopping cart.

https://secure.unicity.net/unicityusa/ShoppingCart/Shop.cfm?&Country=USA&LNG=eng&AddItem=0205

Any ideas guys?

Thanks a million

Jacob

xxneon
02-13-2008, 06:26 PM
in the form action value .. your missing the '0205' at the end of the AddItem=.. might that be the problem..

GnAProductions
02-13-2008, 06:32 PM
Nah, thats not it. The form action, has the "Add Item" at the end, and then, there is a drop down box, with multiple items, and when you select the item, and hit "add to cart" its suppos to attach that item number, to the end of the Form action.

Am I Clear as mud? haha

xxneon
02-13-2008, 06:34 PM
will this do it?
<form action="https://secure.unicity.net/unicityusa/ShoppingCart/Shop.cfm?&amp;Country=USA&amp;LNG=eng&amp;" method="get" id="shopform">
<select name="AddItem" class="product_description">
<option value="22365">Item# 22365 / Caplets / $39.00</option>
<option value="13672">Item# 13672 / Packets / $33.00</option>
</select>
<input name="image4" type="image" onmousedown="document.getElementById('shopform').submit()" src="images/add_to_cart.jpg" width="72" height="15" />
</form>

GnAProductions
02-13-2008, 07:23 PM
That works! Not sure why, dont think i see the difference. But who cares! it works :)

Thanks a million!:D

xxneon
02-13-2008, 07:29 PM
i basically took out the AddItem from the query string and named the select item as AddItem.. so taht when you send the form data.. it will append AddItem= and the selected items value.. to the end of the action url.