I have a form with 3 phone numbers. One of the 3 is required. Why doesn't this work.
My first line of the form is:
Thanks for any helpCode:<form id="infoupdateform" method="post" action="xxx.php" onsubmit="validateform()"> <script type="text/javascript"> function validateform(){ if ((document.getElementByName('home').value == '') && (document.getElementByName('cell').value == '') && (document.getElementByName('work').value == '')) { alert('At least 1 phone number is required'); document.getElementById('home').focus(); } } </script>



Reply With Quote

Bookmarks