[FONT=Arial]Hi, i am currently learning to do a very basic shopping cart. The task is to add options from a drop down menu such as size or colour to the cart.
I have tried all the ways i know off but i keep getting errors.
To add an item to the cart via a link i use this…
<a href=”javascript:additem(‘description’, ‘colour’, ‘size’, ‘price’,’qty’);”>
the colour and the size bits is where i am having problems, i have a drop down list for each item being the colour and size but i do not know how to include it so show on the cart itself.
Here is the current bit of code i have to add it to the columns…
Code:
write(“<TD>” + items[i].desc);
write(“<TD>” + items[i].col); <– the colour which shows on the cart just shows ‘colour’ from the <a href link
write(“<TD>” + items[i].size); <– the size which shows on the cart just shows ‘colour’ from the <a href link
write(“<TD>£” + items[i].price);
write(“<TD>£” + (items[i].price * items[i].quantity));
If anyone has any ideas of how I can do this please could you let me know as I would be very greatful!
Thanks in advanced,
Marc ? [/FONT]