Hi there
I'm trying to set up form validation and confirmation by way of focussing on the field(s) not completed (one at a time, early one first). Then once the form is completed, there is a confirmation of entered values listed (alert). I'm not sure how to handle the radio button variable name="Card_Type". The value is "undefined". It's the last thing I need to do and I'm finished! (Note: I left out extraneous code to make it easier to analyze.)
<script type="text/javascript" language="JavaScript">
function validateForm(pageForm) {
if (!pageForm.Card_Type[0].checked && !pageForm.Card_Type[1].checked && !pageForm.Card_Type[2].checked) {
pageForm.Card_Type[0].focus() ;
return false;
}
var entry = pageForm.Card_Type.value
var r=confirm(entry)
if (r==false) {
alert("Please return to form" + '\n' + "and make corrections.");
return false ;
}
return true;
}
</script>
Many thanks.