Ok, I think we have a winner.
James Lawrence from Freeserve ([EMAIL PROTECTED]) submitted a little
JavaScript that does the job well on the client side.  This was the
smallest, cleanest, fastest method that anyone submitted.  I added the
second line to make sure that all other letters after the first were lower
case.

Enjoy:

<SCRIPT LANGUAGE="JAVASCRIPT">
<!--
function capitalizeMe(obj) {
        val = obj.value.toLowerCase();
        newVal = '';
        val = val.split(' ');
        for(var c=0; c < val.length; c++) {
                newVal += val[c].substring(0,1).toUpperCase() +
val[c].substring(1,val[c].length) + ' ';
        }
        obj.value = newVal;
}
-->
</SCRIPT>

<FORM NAME="TEST">
<INPUT TYPE="TEXT" NAME="TESTER" onChange="capitalizeMe(this)">
</FORM>


John McKown, VP Business Services
Delaware.Net, Inc.
30 Old Rudnick Lane, Suite 200 Dover, DE 19901
email: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
phone: 302-736-5515
fax: 302-736-5945
icq: 1495432

------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to