Bruno Friedmann-2 wrote:
> 
> 
> If you want to interact with the content of the textarea during the
> "client phase" you must interact with the browser and this
> is done by a javascript you could attach on the textarea.
> 
> Google is your friend
> something like this
> http://www.tutorialstream.com/tutorials/javascript/check-textarea-length/
> 
> 


You'll have to excuse me, but it seems to me that the
Zend_Dojo_Form_Elements are javascript-based Dijits, intended to validate on
the client-side.  I can easily (without Google, even) check a textarea's
length, but I was expecting the functionality of most of the other
Zend_Dojo_Form_Elements.  From Matthew's response, I'm not sure I'm mistaken
about that, but am I?

I've been scouring the ZF code and the Dojo API looking for clues as to why
this would or wouldn't work with a textarea, and I'll spare you the code
snippets, but it just seems like a (very strange) limitation of Dojo Dijits. 
There's no validate() function for dijit.form.Textarea the way there is for,
say, dijit.form.ValidationTextBox or dijit.form.ComboBox.  It is to weep. 
Kinda doesn't make sense to me, so if it actually does make sense, I'd love
to know why.

That having been said, I guess the way to go is to just put some custom
javascript in the oninit, onblue and onkeypress events of the textarea, like
Dojo has built in for those other Dijits.  Yes?

Ian



-- 
View this message in context: 
http://www.nabble.com/How-to-validate-Zend_Dojo_Form_Element_Textarea--tp19690291p19695957.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to