onkeydown and javascript with tobago

View: New views
2 Messages — Rating Filter:   Alert me  

onkeydown and javascript with tobago

by Douglas R. Haase :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

by Volker Weber-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 <doug.r13@...>:

> 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