Community Forums 

Main Content

Re:Color dropdown does not appear

    Aug 27 2011 07:12:49



    Join date : 2011-08-25      Posts : 11

    Thank you Debbie and GT. Both are great suggestions.

    I'll be using Debbie's idea, coz it reduces the work for a customer when they want to place a order.

    I'd like to add a clear selection button, which clears the cart as well, to each item.

    Would also like to add a clear all button which clears the cart as well. The current "clear selection" button does not update the "display cart contents on the same page" ( and does not clear the cart.

    appreciate the help.

    This is the code so far:



    <script type="text/javascript">
    function upDate(){
    qty="0"; sub="0.00";
    if (querystring.charAt(0)!="q"){querystring="";}
    if (querystring){
    today=new Date();
    expireDate = new Date(today.getTime() + millisecs_in_half_hour);
    if (document.cookie !=""){
    thisCookie=document.cookie.split("; ");
    for (i=0; i<thisCookie.length; i++) {
    if (thisCookie.split("=")[0]=="qty"){
    if (querystring){
    qty=querystring[0].split("=")[1]; if (qty==""){qty="0";}qty=parseInt(qty);
    sub=querystring[1].split("=")[1]; if (sub==""){sub="0.00";}
    update=document.write(": "+qty+"<br>Subtotal: "+sub+"");
    return update;



    <script type="text/javascript">upDate()</script>
    <a href=";">View your cart/checkout</a>

    <form action=""; method="post">
    <input type="hidden" name="userid" value="E9120065">
    <input type="hidden" name="return" value="">;
    <input type="hidden" name="nocart">

    <input type="hidden" name="productpr1" value="Taffeta Velvet, :20.00:1">
    Color:<select name="product1[]">
    <option selected="Red">Red</option>
    <option value="White">White</option>
    <option value="black">black</option>
    Quantity:<input type="text" name="qty1" size="2">


    <input type="hidden" name="productpr2" value="Satin, :20.00:1">
    Color:<select name="product2[]">
    <option selected="Red">Red</option>
    <option value="White">White</option>
    <option value="black">black</option>
    Quantity:<input type="text" name="qty2" size="2">

    <input type="submit" value="Order my Cider">

    <input type="reset" name="Clear your selection" value="Clear your selection">
    <input type="submit" name="Submit" value="Add to order" onclick="alert('Order has been added to your cart\n\nThis page will refresh');">