var missingOptionName = null;
function doOptionCheck(form){
var qty = 0;
var version = 3;
// test products
for(k=0;k
0){
qty += parseInt(fldValue);
if(!checkOption(form,pid)){
if(missingOptionName){
alert("You forgot to select the " + missingOptionName + " option for the " + pName);
}
else{
alert("You forgot to select a required option for the " + pName);
}
return false;
}
}
}
}
if(qty == 0){
alert("You have not entered a valid quantity for a product?");
return false;
}
return true;
}
// -------------------------------------------------------------------
function checkOption(form,pid){
// go through and get the value of the options in form
for(i=0;i