You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Fabio Vilela <fb...@gmail.com> on 2008/07/01 16:02:49 UTC

[trinidad] Trinidad 1.2.2 with javascript Id problem.

Hi folks,

i'm using trinidad 1.2.2 .
i have following code :

<h:inputTextarea rows="5"
onkeyup="limitText(3000,'descricao');"
id="textArea1"
onkeyup="limitText(3000,'textArea1');"
cols="115"
value="#{editarRelato.entity.descricao}"/>

This page is trying to use a javascript with the "limitText" function.
i'm trying to use the getElementById("textArea1"). but the code generated
with trinidad is:

<textarea rows="5" onkeyup="limitText(3000,'textArea1');" cols="115"
name="j_id22:textArea1" id="j_id22:textArea1"/>
so.. getElementById does not work because generated id is
"j_id22:textArea1" and not  "textArea1"

What should i do to solve this problem??

thank you guys.. sorry for bad english (i'm from Brazil)