I have a page where onSubmit I want this function to check if radio button 2 was selected and if there was anything entered into the mobile phone no. text area ("mobile". What is happening at the moment is that the alert is coming up whether or not there is anything in the text area. If the function is called from the onClick on the radio button it also clears the text area (??)
Can anybody help?
function changecheck() {
if ((eval("document.form1.button[2].checked" == true)
&& (document.form1.mobile.value = ''));{
alert('You have not entered a mobile phone no.!');
return false;
}
}
Can anybody help?
function changecheck() {
if ((eval("document.form1.button[2].checked" == true)
&& (document.form1.mobile.value = ''));{
alert('You have not entered a mobile phone no.!');
return false;
}
}