hi
i have this order form and i’m validating the required fields by this tags
<input type=’hidden’ name=”required” value=”name,city,pobox,zip,mobile,tele,email”/>
[B]1st Q:[B]OR[COLOR=Red]mobile or tele
[B]2nd Q,
and under each type quantity from 1-10(dropdown menu)
and more than 10 (textfield)
so total of 4 quantities.
what i want is to check if the user selected either one of the CDs , either of the quantites
i tried this code but it’s not working
<script language=”javascript”>
function verify(){
var msg = ” you are required to complete the following fields: “;
if (document.orders.only_cd.checked==false && document.orders.giftbox.checked==false)
{msg = msg + ” – CD type”;
}
if(document.orders.quantity_only_cd.value==”quantity” && document.orders.quantity_cd_giftbox==”quantity”)
{
msg = msg + ” – CD quantity”;
}
else {
alert(msg);
return false;
}
}
</script>
and i called the function on the <input type=”submit” name=”Submit” value=”Submit” onclick=”verify();”/>
what’s wrong with the code?