simple Code not validating on Firefox

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

simple Code not validating on Firefox

Chris Carter
Why would this code work in IE 6 & 7 but not in Firefox 2.0.

function validateCategory(){
if(document.categorySearch.category.value==""){
alert("Please select a category to search.");
return false;
}
return true;
}

It's being called from homepage through a external js file like this onsubmit="return validateCategory();

Please advice.