<form method="post" action="process.asp" name="sform" onSubmit="return checkForm(this); return false;">
function checkForm(f) { if (f.elements['FieldName1'].value == "" && f.elements['FieldName2'].value == "") { alert("You have not specified the products you wish to order please go back to step 2"); return false; } else { f.submit(); return false; } }