shanuragu
06-09-2003, 11:34 PM
HI
I have two radio buttons whose value is O & D respectively.
If o is checked a text area with a name remarks should be made mandatory field. Please tell me what is wrong in the following code.
here is the code:
if(document.form.ord_status.checked)
{
alert(1);
if(document.form.ord_status.value='O')
{
alert(2);
if (document.form.remarks.value=="")
{
alert(3);
alert("Cannot leave balnk.. Enter Remarks for Outstanding Status.. ");
document.form.remrks.focus();
return false;
}
}
}
ShaRa:confused:
I have two radio buttons whose value is O & D respectively.
If o is checked a text area with a name remarks should be made mandatory field. Please tell me what is wrong in the following code.
here is the code:
if(document.form.ord_status.checked)
{
alert(1);
if(document.form.ord_status.value='O')
{
alert(2);
if (document.form.remarks.value=="")
{
alert(3);
alert("Cannot leave balnk.. Enter Remarks for Outstanding Status.. ");
document.form.remrks.focus();
return false;
}
}
}
ShaRa:confused: