You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "Douglas R. Haase" <do...@gmail.com> on 2009/10/28 19:41:45 UTC
onkeydown and javascript with tobago
hi everyone,
i wanna know if there's something like this:
<html>
...
<body onload="validateText()">
....
<h:inputTextarea id="textArea" value="#{textBean.text}"
onkeyup="validateText()">
... for tobago..
I need to validate some field (or even apply a mask for tc:date) when
I'm pressing the keys on the specified input, so I was looking for
some way to call a java script and do that the same way I would do
using the html core, using the onkeyup method...
thanks :)
Re: onkeydown and javascript with tobago
Posted by Volker Weber <v....@inexso.de>.
Hi Douglas,
yes this is easy in tobago:
<tc:textarea ...>
<f:facet name="keyup">
<tc:command onclick="validateText()"/>
</f:facet>
</tc:textarea>
this add a eventlistener for the keyup event to the textarea.
Regards,
Volker
2009/10/28 Douglas R. Haase <do...@gmail.com>:
> hi everyone,
>
> i wanna know if there's something like this:
>
> <html>
> ...
>
> <body onload="validateText()">
> ....
>
> <h:inputTextarea id="textArea" value="#{textBean.text}"
>
> onkeyup="validateText()">
>
> ... for tobago..
>
> I need to validate some field (or even apply a mask for tc:date) when
> I'm pressing the keys on the specified input, so I was looking for
> some way to call a java script and do that the same way I would do
> using the html core, using the onkeyup method...
>
> thanks :)
>
--
inexso - information exchange solutions GmbH
Bismarckstraße 13 | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX: +49 441 4082 355 | www.inexso.de