HI ,
I use this script to validate the entry of a zip-code (minimum 4, maximum 5 characters)
Unfortunately in Germany we have zips starting with a 0, in this case the Javascript pops up and asks for a correct number. How can I avoid this?
Thank you,
Tom


Code:
<script type="text/javascript" language="javascript">
function validateNumber(field, msg, min, max) {if (!min) { min = 0 }if (!max) { max = 255 }if ( (parseInt(field.value) != field.value) ||         field.value.length < min || field.value.length > max) {alert(msg);field.focus();field.select();return false;}return true;}
</script>
...
<form name="eingabe" action="fgeintragen2.php" method="post"  onsubmit="return (
validateNumber(this.plz, 'Please enter a valid zip-code', 4, 5)
);" >