Validating Additional field in register.php
Hi,
I am trying to validate an additional field in the modify profile and the create profile page. I am using this script:
<script type="text/javascript">
{literal}
var PhoneObj = document.getElementById('additional_values_2');
if (PhoneObj.length!=10 )
{ alert('Please enter a phone number that is 10 digits long with no dashes "-".'); return false;
}
else return true;
{/literal}
</script>
but, everywhere that I place the code it does nothing. I need to make sure that the member inputs a phone number that has no "-" in it and is only 10 digits long.
Thanks for the help.
__________________
Xcart 4.3
|