I am posting data from a form. I want to check if the data is valid and make a choice on the result. After I make the choice and go through the error checking, the variable "yesno" is null.
This is the code that checks the value yesno:
This is the code in the form:
If I choose a field that a user inputs in at text box, there is no problem with checking the field.
I hope this is clear enough. Can anyone help?
Thanks in advance and thanks for reading my post.
Al castanz@yahoo.com
This is the code that checks the value yesno:
Code:
if (frm.yesno.value == "Yes"){
alert (frm.yesno.value) //This returns a null value so the above condition is never met.
if (frm.Date_Treatment.value == "")
alert("Please enter a Date ")
frm.Date_Treatment.focus()
return false
}
This is the code in the form:
Code:
<select Name="yesno" size="1">
<option Value="Yes" Selected>Yes </option>
<option Value="No">No </option>
</select>
If I choose a field that a user inputs in at text box, there is no problem with checking the field.
I hope this is clear enough. Can anyone help?
Thanks in advance and thanks for reading my post.
Al castanz@yahoo.com