You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Markus Grell <ta...@military.de> on 2012/03/21 21:35:06 UTC
Accessing zone form elements
Greetings!
I have a page that has the following structure:
...
<form...>
<t:select t:id="manufacturer"...zone="output/>
<t:zone id="output" t:id="output">
<t:select t:id="item" id="item".../>
</t:zone>
</form>
The idea: The select list "item" is updated based on the choosen value of
select list "manufactuer". Content for "item" is pulled from a database.
That works fine but now I need to add some javascript that operates on the
"item" select list. After the first update of the zone, the id of the
select list changes to "item_<hexnumber>".
Due to this new id the Javascript document.getElementById("item") fails,
for sure.
How can I solve that? Any ideas?
Markus
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Accessing zone form elements
Posted by Taha Hafeez Siddiqi <ta...@gmail.com>.
Hi
You can override the id generated for select by using parameter "clientId". So in your inner select you can use clientId='item'
regards
Taha
On Mar 22, 2012, at 2:05 AM, Markus Grell wrote:
> Greetings!
>
> I have a page that has the following structure:
>
> ...
> <form...>
> <t:select t:id="manufacturer"...zone="output/>
> <t:zone id="output" t:id="output">
> <t:select t:id="item" id="item".../>
> </t:zone>
> </form>
>
> The idea: The select list "item" is updated based on the choosen value of
> select list "manufactuer". Content for "item" is pulled from a database.
> That works fine but now I need to add some javascript that operates on the
> "item" select list. After the first update of the zone, the id of the
> select list changes to "item_<hexnumber>".
> Due to this new id the Javascript document.getElementById("item") fails,
> for sure.
>
> How can I solve that? Any ideas?
>
> Markus
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org