Hi,
My first time to post on this forum, hope that you guys can help me.
Below is the form that I need to make it work for the input validation. I have no problem making both BUSINESS NAME and STATE/CITY work for the javascript validation.
The only problem I have is the STATE/CITY (within one field). By Default, I have “CA,” <input value=”CA”> on it without a city. I need my visitor to enter the city before click on the search button.
Business Name: XYZ Cafe
State and City: CA,
<script language=”javascript”>
function fnValidate(){
if(document.frmBusinessSerch.bname.value==””){
alert(“Please enter the Business Name.”)
document.frmBusinessSerch.bname.focus()
return false
}
if(document.frmBusinessSerch.statecity.value==””){
alert(“Please enter the State & City”)
document.frmBusinessSerch.statecity.focus()
return false
}
}
</script>