just guessing without seeing your page but
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title></title>
<script type="text/javascript">
/*<![CDATA[*/
function DoCustomValidation(){
var pass=true,frm=document.forms["request"],rads=frm.method
for (var z0=0;z0<rads.length;z0++){
if (rads[z0].checked&&frm['vet'+rads[z0].value].value.replace(/\s/g,'').length==0){
alert('Please provide a '+rads[z0].value+' number');
pass=false;
}
}
return pass;
}
/*]]>*/
</script></head>
<body>
<form name="request" >
Fax <input type="radio" name="method" value="fax" /><input name="vetfax" /><br />
Post <input type="radio" name="method" value="post" /><input name="vetpost" /><br />
<input type="button" name="" value="TEST" onclick="DoCustomValidation()"/>
</form>
</body>
</html>
Bookmarks