matt wrote:
I have a form with a dropdown menu and I want to make sure
that people have clicked on something.
You cannot make it sure. Client-side scripting can be disabled
or not even supported. Server-side checking is required anyway,
but you can reduce round trips with client-side checking.
I have a NA one at the bottom
?
but I want an error to popup if they dont move it from its
default value
function checkMe(oForm)
/**
* @param oForm
* Reference to the HTMLFormElement object to be checked.
* @returns
* <code>true</code> if validation is passed,
* <code>false</code> otherwise (and thus canceling the event).
*/
{
if (/* any form control has its default value */)
{
alert(...);
// ...
return false;
}
return true;
}
<form ... onsubmit="return checkMe(this)" ...>
...
</form>
HTH
PointedEars