question about whitespace

Giganews Newsgroups
Subject: question about whitespace
Posted by:  Dwayne Epps (dwayneeppsNOSP…
Date: Sun, 13 Jul 2003

I've created a function that checks form fields that only will have letters.
This is the script:

<script type="text/javascript" language="javascript">
function validateString(field, msg, min, max) {
if (!min) { min = 1 }
if (!max) { max = 65535}
if (!field.value || field.value.length < min || field.value.max > max) {
return false;
return true;

How can I add code to this function that checks for whitespace...ex.
I would also like to check for only letters in the fields and make sure no
numbers have been entered.  Any help is appreciated.  Thanks in advance.