Posts: 100
Name: Drew
Location: Garland (Dallas), Texas
|
technically, this should be in the javascript forum, but ill post it here anyway. what you have to do is give the form a name, lets call it "country". now keep the first entry "Select Country" like you have it. in a drop down box, javascript looks at all the values as an array, so you must treat it as that. so heres the javascript.
Code:
var myindex = document.forms[0].country.selectedIndex;
if (myindex == 0) {
alert("Please select a country from the appropriate menu.");
document.forms[0].country.focus();
return false;
}
of course, you must call this when the form is submited. but i hope this helps you out a little.
__________________
Best Regards,
Drew Decker
Please login or register to view this content. Registration is FREE
|