Community Forums 

Main Content

Re:Quantities changed by Shopper...hmmmm???

    Feb 01 2009 19:58:09

    #1

    maggoo

    Join date : 2009-01-30      Posts : 2

    Hello anon,

    I tried your solution, but cant make it work. Maybe you could spell it out some more. I have done the following to my form:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">;

    <html>
    <head>
    <script type='text/javascript'>
    function validate_qty(qty) {
    if(qty%1 != 0) {
    alert('Quantity must be a whole number');
    return false;
    }
    }
    </script>

    </head>

    <body>
    <form action="http://ww12.aitsafe.com/cf/add.cfm"; method="post">
    <input type="hidden" name="return" value="www.webl/" />
    <input type="hidden" name="userid" value="Exxxxx" />
    <input name="product" type="hidden" value="things">
    <input name="price" type="hidden" value="money">
    onsubmit='return validate_qty(this.qty.value);'
    </form>


    </body>
    </html>

    I guess the onsumit thingy is placed/used totally wrong, but i cant sort it out how it should work. Can you give me the proper syntax?

    TIA:P