jonnygrant
asked on
VALIDATE A HTML SELECT
this is my code:
<Font type="verdana" size="2">Urgency:</Font><S ELECT size=1 id=txtUrgency_Type name="txtUrgency_Type">
<OPTION selected>Please select</OPTION>
<OPTION value="URG">Urgent</OPTION >
<OPTION value="NON">Non Urgent</OPTION>
</SELECT>
i want to validate this in jscript any ideas?
also how do i pass this value to an asp page
<Font type="verdana" size="2">Urgency:</Font><S
<OPTION selected>Please select</OPTION>
<OPTION value="URG">Urgent</OPTION
<OPTION value="NON">Non Urgent</OPTION>
</SELECT>
i want to validate this in jscript any ideas?
also how do i pass this value to an asp page
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>> i want to validate this in jscript any ideas?
I don't want to raise a stink over a measly 20 points, but why did you accept a VB script answer when what you asked for was a jscript answer?
I don't want to raise a stink over a measly 20 points, but why did you accept a VB script answer when what you asked for was a jscript answer?
function validateUrgenceyType(theSe
{
if ( theSelect.selectedIndex <= 0 )
{
alert("Please select a value for Urgency.");
theSelect.focus();
return(false);
}
return(true);
}
</script>
Call the above function in your form's onSubmit:
<FORM .... onSubmit='return(validateU