Thanks everyone for your help on this one!

-----Original Message-----
From: Jochem van Dieten [mailto:[EMAIL PROTECTED]]
Sent: 20 August 2001 10:53
To: CF-Talk
Subject: Re: Limiting text entered into TextArea


[EMAIL PROTECTED] wrote:

> i guess it is compare with fieldname.length.

Almost, it is compared with formname.value.length like in the example 
below. Doesn't work flawlessly (one can paste stuff into the field 
without pressing a key), but it is a start.

<textarea name="text" onkeypress="return checkLength(this,500)">

<script language="JavaScript">
        function checkLength(formfield,limit) {
                if (formfield.value.length > limit) {
                        alert("Only " + limit + " characters allowed.");
                        return false;
                        }
                }
        </SCRIPT>


------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------
> 
>  The information transmitted is intended only for the person or entity
to
> which it is addressed and may contain confidential and/or privileged
> material.  Any review, retransmission,  dissemination or other use of,
or
> taking of any action in reliance upon, this information by persons or
> entities other than the intended recipient is prohibited.   If you
received
> this in error,  please contact the sender and delete the material from
any
> computer.
> -- Phoenix Global Solutions (India) Pvt Ltd., www.pgsolutions.com

I am retransmitting and also kindly inviting you to take legal action 
against that.


Jochem
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to