use javascript if you want...
<script language="javascript">
function checkForm(theForm){
theVal = theForm.zip.value.parseInt();
if( theVal.length() >= 3 && theVal.length() <= 5 )
return true;
alert("You must enter whatever");
return false;
}
</script>
<form ..... onsubmit="return checkForm(this);">
<input type="text" name="zip"....
Bryan Love ACP
Internet Application Developer
Telecommunication Systems Inc.
[EMAIL PROTECTED]
-----Original Message-----
From: Brian Horn [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 29, 2001 1:31 PM
To: CF-Talk
Subject: counting min chars in form field
How do you count chars in a form field. I have a zip code field that is used
for a search. I want to allow them to key in 3-5 digits of a zip code. I've
got max to make the 5 happen, but how do I check to make sure that they
keyed at least 3?
Brian Horn
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists