Basically I have a form that has
--------------------------------
as an option to make a line (because the options in the drop down box are coming from a database)
I have validation for everything,
the bit that checks that something has been selected is
x=frm.country[0];
if (x.selected) {
alert ('Blah blah');
return false;
}
How would i make it so it checks to see if the line has been chosen.
Ive tried
x=frm.country[0];
if (x.value ='--------------------------------') {
alert ('Blah blah');
return false;
}
But no luck and when i use just '-' it stops all of them.
Thanks for your help in advance
--------------------------------
as an option to make a line (because the options in the drop down box are coming from a database)
I have validation for everything,
the bit that checks that something has been selected is
x=frm.country[0];
if (x.selected) {
alert ('Blah blah');
return false;
}
How would i make it so it checks to see if the line has been chosen.
Ive tried
x=frm.country[0];
if (x.value ='--------------------------------') {
alert ('Blah blah');
return false;
}
But no luck and when i use just '-' it stops all of them.
Thanks for your help in advance