I am having a problem with validating my form, it works if I only validate 1 field, but if I try to validate more than 1, nothing happens when I click submit
Here is my code:
function validateForm()
{
var x=document.forms["dform"]["name"].value
if (x==null || x=="")
{
alert("Enter Name!");
return false;
}
}
{
var x=document.forms["dform"]["selling_1"].value
if (x==null || x=="")
{
alert("Enter Selling Name!");
return false;
}
}



Reply With Quote



Bookmarks