I have a form with radio buttons names "send" and values of "Mail" that has a text box for "city" and "Fax" the Fax has a text box of "send_fax" which is a texbox for the fax number. Now what I'm trying to do is validate that the user has selected either Fax or Mail and once that is determined validate the text box is not empty. Here's what I've tried to no avail. I'm pretty new to JavaScript so any help is greatly appreciated.
So for the fax validation I have:
if ((form.send.value =="Fax"
) || (form.send_fax.value ==""
{
alert( "Please enter a Fax Number to send to."
;
form.send_fax.focus();
return false;
}
***At this point I'm stuck as it's not validating correctly? Any thoughts/ideas?
Thank You
Regards,
Tread42
So for the fax validation I have:
if ((form.send.value =="Fax"
{
alert( "Please enter a Fax Number to send to."
form.send_fax.focus();
return false;
}
***At this point I'm stuck as it's not validating correctly? Any thoughts/ideas?
Thank You
Regards,
Tread42