Hi,
Ive got a form which i validate using javascript. One of the form elements is a list menu.

I use the following script to validate that the form fields have been filled in:

PHP Code:
function verifyBook() {
var 
themessage "You are required to complete the following fields: ";
if (
document.calypsoBook.phone.value=="") {
themessage themessage " -  Phone";
}
if (
document.calypsoBook.style.value=="") {
themessage themessage " -  Fishing Style";
}
//alert if fields are empty and cancel form submit
if (themessage == "You are required to complete the following fields: ") {
document.calypsoBook.submit();
}
else {
alert(themessage);
return 
false;
   }

The problem is, document.calypsoBook.style.value refers to a list menu, and even when i have selected an item, it still gives the alert. i think there must be a different way to validate that something has been selected from the list menu.

Please help. ive googled but not found anything.