You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by bogdan_cm <bo...@rbccm.com> on 2012/05/13 22:29:09 UTC
Tapestry.ZONE_UPDATED_EVENT issue
Hello everyone,
I have this nagging little problem handling the zone updated event. I
tried all that I could find on this forum and still cannot solve it.
My TML zone:
<t:zone t:id="mediaZone" id="mediaZone">
<div id="big_photo_div">
Some other code here.
</div>
</t:zone>
my jquery event handler sitting in the .js file and imported into the page:
$jq("mediaZone").on("Tapestry.ZONE_UPDATED_EVENT", function(){
alert("EVENT TRIGGERED");
});
The above does not work when the zone is updated.
Is there a working example posted anywhere? I can only find bits and pieces
of examples that do not work when put together.
Thanks very much,
Bogdan.
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-ZONE-UPDATED-EVENT-issue-tp5708402.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Tapestry.ZONE_UPDATED_EVENT issue
Posted by bogdan_cm <bo...@rbccm.com>.
Thank you both for the reply. "bind" was my first try and I eventually tried
with "on". I'll try the Prototype version as well.
Funky problem :).
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-ZONE-UPDATED-EVENT-issue-tp5708402p5711203.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Tapestry.ZONE_UPDATED_EVENT issue
Posted by nquirynen <na...@pensionarchitects.be>.
Your jquery selector is wrong I think it has to be $('#mediaZone'). So with
the "#" as it's the id attribute.
Also I always use jqueries "bind" function. Not sure if thats the problem
though.
$('#mediaZone').bind(Tapestry.ZONE_UPDATED_EVENT, function(event) {
...
}
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-ZONE-UPDATED-EVENT-issue-tp5708402p5710659.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Tapestry.ZONE_UPDATED_EVENT issue
Posted by Steve Eynon <st...@alienfactory.co.uk>.
Try removing the double quotes from "Tapestry.ZONE_UPDATED_EVENT" :
$jq("mediaZone").on(Tapestry.ZONE_UPDATED_EVENT, function(){
alert("EVENT TRIGGERED");
});
Failing that, not knowing anything about jQuery integration, I'd try
the more T5 standard Prototype functions:
$("mediaZone").observe(Tapestry.ZONE_UPDATED_EVENT, function(event) {
alert("EVENT TRIGGERED");
});
Steve.
On 14 May 2012 04:29, bogdan_cm <bo...@rbccm.com> wrote:
> Hello everyone,
> I have this nagging little problem handling the zone updated event. I
> tried all that I could find on this forum and still cannot solve it.
>
> My TML zone:
>
> <t:zone t:id="mediaZone" id="mediaZone">
> <div id="big_photo_div">
> Some other code here.
> </div>
> </t:zone>
>
>
> my jquery event handler sitting in the .js file and imported into the page:
>
> $jq("mediaZone").on("Tapestry.ZONE_UPDATED_EVENT", function(){
> alert("EVENT TRIGGERED");
> });
>
> The above does not work when the zone is updated.
>
> Is there a working example posted anywhere? I can only find bits and pieces
> of examples that do not work when put together.
>
> Thanks very much,
> Bogdan.
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-ZONE-UPDATED-EVENT-issue-tp5708402.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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