![]() |
Javascrpt to show Quantity
Hello
Maybe i am trying to do this in the wrong place. but here goes I would like the user to know how many items she ordered via a JS popup before the items get added to the cart. I have the following to show what she selected but it does not show how many she ordered from the Select Quantity Box. So if she ordered 3 items can I get the pop-up to show she ordered 3 items. The JS validation I started to give the idea what she ordered is below but I do not know how to show the quantity. Is it possible to show the quantity? I was wondering if it was a simple task to let the user know how many items she is ordering via javascript validation. Below is what I have so far. var obj = product_option("color"); if (obj && obj.selectedIndex == 0) { r=confirm("You Selected a Red Poker Chip with Red Text \nFor each Quantity Ordered You will Receive 1 Bag of 200 Poker Chips"); if (r==true) { return true; } else { return false; } } else if (obj && obj.selectedIndex == 1) { r=confirm("You selected a Red Poker Chip with Black Text \nFor each Quantity Ordered You will Receive 1 Bag of 200 Poker Chips "); if (r==true) { return true; } else { return false; } } else if (obj && obj.selectedIndex == 2) { r=confirm("You Selected a Black Poker Chip with Red Text \n For each Quantity Ordered You will Receive 1 Bag of 200 Poker Chips"); if (r==true) { return true; } else { return false; } } else if (obj && obj.selectedIndex == 3) { r=confirm("You Selected a Black Poker Chip with Black Text \nFor each Quantity Ordered You will Receive 1 Bag of 200 Poker Chips "); if (r==true) { return true; } else { return false; } } Thanks for any suggestions on this. |
All times are GMT -8. The time now is 09:53 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.