[Javascript] Q on interuppting char entry
Walter Torres
walter at torres.ws
Mon Apr 14 09:26:00 CDT 2003
Your evaluation is correct.
And your suggestion is exaclty how I fixed it.
Walter
> -----Original Message-----
> From: javascript-bounces at LaTech.edu
> [mailto:javascript-bounces at LaTech.edu]On Behalf Of Chris Tifer
> Sent: Monday, April 14, 2003 7:45 AM
> To: [JavaScript List]
> Subject: Re: [Javascript] Q on interuppting char entry
>
>
> > I have all the code to:
> > - parse all TEXTAREAS on a document
> > - discover if a MAXLENGTH is defined and if it is larger than ZERO
> > - get length of value
> > - compare it to MAXLENGTH value
> > - replace value with only set character count
> >
> > But the last character entered flashes. I'm trying to no have
> that happen.
>
> To do this, you have to return false on the keypress which keeps the
> character from being entered. From the looks of it, you're checking the
> length, determining if it's too long, THEN removing it. Thus the quick
> appearance
> and then disappearance.
>
> Chris Tifer
> http://emailajoke.com
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
More information about the Javascript
mailing list