I am using input type = button instead of input type = submit to submit a form values. Now I want to validate all text box, select box and check box while clicking that button, how do I do that? help me
Follow the below steps,
Get the value of the text box like,
var controlValue = $("#controlid").val();
The do the validation using the condition as required, say for example as,
if(txtBox1 != "")
{
alert("error");
}
If all conditions passed then submit the form.
$("form[0]").submit();