I am trying to prevent the max number of characters in my textarea.
Unfortunately that is not a common with Textareas.  I have other options as
far as fixing my problem but one of the possible solutions is preventing a
paste and keypress with an onKeyPress and OnPaste event.  Here is an example
of what I would do with a non-dbforms textarea.

<textarea onKeyPress="return ( this.value.length < 2 );" onPaste="return ((
this.value.length + window.clipboardData.getData('Text').length) < 2
);"></textarea>

Unfortunately the tld doesn't recognize onPaste.  There is probably a good
reason for this (it's not a standard over all browsers I'm sure).  I was
just wondering why.

I don't know of a reason to keep it out provided that the "not supported by all browsers" thing is documented and it works.

You could have a go at org.dbforms.taglib.TagSupportWithScriptHandler locally and if 
you get it working then post your code to the list.

Otherwise, the Validation Framework handles max length and do it in an interceptor too 
in case someone disables javascript.

--
Shawn

Karma is immutable, so act accordingly!



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
DbForms Mailing List

http://www.wap-force.net/dbforms

Reply via email to