You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Diego <di...@gmail.com> on 2007/04/13 09:43:34 UTC
Event bubbling in IE doesn't work
Hello,
I want to use event bubbling to find out what checkbox is click with an
Ajax call.
To do this I attach the EventListener to a div surrounding the checkboxes.
This works in firefox, the id of the checkbox is returned. But in IE the id
of the surrounding div is returned.
Is there a way to get the id of the clicked checkbox?
Regards,
Diego
Re: Event bubbling in IE doesn't work
Posted by Diego <di...@gmail.com>.
On 4/13/07, Kristian Marinkovic <kr...@porsche.co.at> wrote:
>
>
> ... maybe ff and ie handle this scenario differently... i'll test it
> and report my results on monday :)
>
> another solution would be to have a small script in place (onclick)
> that checks the incoming events on the div node and triggers the
> eventlistener (script) method only if it could determine it really
> originates from the checkbox... thats what i do for my bubbling events :)
>
> g,
> kris
>
That last tip was very usefull, got it to now to work.
On 4/14/07, Jesse Kuhnert <jk...@gmail.com> wrote:I'm shocked to hear
that ie isn't behaving as expected! ;)
http://www.quirksmode.org/js
>
> /introevents.html
Don't worry they brought us IE7 now, so 'all' our problems are fixed now ...
Re: Event bubbling in IE doesn't work
Posted by Jesse Kuhnert <jk...@gmail.com>.
I'm shocked to hear that ie isn't behaving as expected! ;)
http://www.quirksmode.org/js/introevents.html
On 4/13/07, Diego <di...@gmail.com> wrote:
>
> Hello,
>
> I want to use event bubbling to find out what checkbox is click with an
> Ajax call.
> To do this I attach the EventListener to a div surrounding the checkboxes.
> This works in firefox, the id of the checkbox is returned. But in IE the
> id
> of the surrounding div is returned.
>
> Is there a way to get the id of the clicked checkbox?
>
> Regards,
> Diego
>
--
Jesse Kuhnert
Tapestry/Dojo team member/developer
Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
Antwort: Event bubbling in IE doesn't work
Posted by Kristian Marinkovic <kr...@porsche.co.at>.
hi diego,
the EventListener is transfering the id of the surrounding div
because the event does not reference the checkbox directly.
it could be that the user clicked on a label element with a for
attribute... technically the label element would trigger the event
and not the checkbox thus referencing the dom node of the label.
.. or maybe there is a node between <input> and </input>
... maybe ff and ie handle this scenario differently... i'll test it
and report my results on monday :)
another solution would be to have a small script in place (onclick)
that checks the incoming events on the div node and triggers the
eventlistener (script) method only if it could determine it really
originates from the checkbox... thats what i do for my bubbling events :)
g,
kris
Diego <di...@gmail.com>
13.04.2007 09:43
Bitte antworten an
"Tapestry users" <us...@tapestry.apache.org>
An
"Tapestry users" <us...@tapestry.apache.org>
Kopie
Thema
Event bubbling in IE doesn't work
Hello,
I want to use event bubbling to find out what checkbox is click with an
Ajax call.
To do this I attach the EventListener to a div surrounding the checkboxes.
This works in firefox, the id of the checkbox is returned. But in IE the
id
of the surrounding div is returned.
Is there a way to get the id of the clicked checkbox?
Regards,
Diego