Stephen,
Thanks for your help - for some reason it isn't working. The only
change I made was in the "JustSelect.one(document.forms.myForm);" line,
as I changed myForm to theForm, as that's the name of the form.
I have another javascript validation code that I'm running on the
"final" form, for the other form elements, via the onsubmit="return..
method. Would it be possible to do this type of dropdown validation
along with the following type of javascript:
=======================
<script language="JavaScript">
// last name
function checkLastName (strng) {
var error = "";
if (strng == "") {
error = "Please enter your last name.\n\n";
}
return error;
}
// department
function checkDepartment (strng) {
var error = "";
if (strng == "") {
error = "Please enter your department.\n\n";
}
return error;
}
// valid selector from dropdown list
function checkClassSession(choice) {
var error = "";
if (choice == 0) {
error = "Please choose a class session from the drop-down
list.\n\n";
}
return error;
}
/**/
<!-- End "validate.js" code -->
<!-- Begin check form script, which refers to "validate.js" code,
listed above -->
<!--
function checkWholeForm(theForm) {
var why = "";
why += checkLastName(theForm.last_name.value);
why += checkDepartment(theForm.department.value);
why += checkClassSession(value);
if (why != "") {
alert(why);
return false;
}
return true;
}
// -->
</script>
---------
here is the way it's called in the body:
<form name="theForm" method="post" onsubmit="return
checkWholeForm(this)"
action="
http://www.domain.com/cgi-bin/[email protected]">
----------
Thanks again,
Louis