Form submits when input is null


I want to prevent form submission when there is no input in the text boxes but the form submits even when the input is empty. How do I fix this?

var input = $("#zip").val();
var input1 = $("#phone").val();

if ( $.trim(input).length == 0 || $.trim(input1).length == 0 ){


This response on SO covers the question well...


Thank you mtf.Post must be at least 20 characters.This is filler.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.