[Proto-Scripty] Re: Having an issue with bubbling of a SELECT's onChange event in IE.

2009-03-05 Thread david

Hi Richard,

not tested, just thought: does it works with DOM0 event ??

--
david

On 26 fév, 16:22, Richard Quadling  wrote:
> Hi.
>
> Below is a simple example of the problem I'm having.
>
> In FF and Chrome, the change event is bubbled to the dynamicContainer.
> In IE it isn't.
>
> Am I doing something wrong? Is there a workaround?
>
> I don't want to watch "click" as it happens as you go into and out of
> the select.
>
> Something else I noticed about Chrome is that the OPTION never
> triggers the event, or at least in the way I'm testing it, only
> Firefox ever has the event fired on an OPTION.
>
> Ideas/suggestions warmly welcomed.
>
> Regards,
>
> Richard.
>
> 
> 
>  src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js";>
> 
> function watchEvents(ev){
>   var el = ev.element();
>   if ('option' == el.tagName.toLowerCase()){
>     el = el.up('select');
>   }
>
>   $('watchedEvents').update(
>     ev.element().tagName + ' / ' +
>     ev.element().id + ' / ' +
>     el.tagName + ' / ' +
>     el.id + ' / ' +
>     ev.type + '
' + >     $('watchedEvents').innerHTML >   ); > > } > > document.observe('dom:loaded', function(){ >   $('dynamicContainer') >     .observe('click', watchEvents) // So I can see when clicks occur - > not in my real code. >     .observe('change', watchEvents) >     .observe('keyup', watchEvents);}); > > > > >   >     >       One >       Two >       Three >       Four >     >   > > > > > > -- > - > Richard Quadling > Zend Certified Engineer :http://zend.com/zce.php?c=ZEND002498&r=213474731 > "Standing on the shoulders of some very clever giants!" --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---

[Proto-Scripty] Re: Having an issue with bubbling of a SELECT's onChange event in IE.

2009-03-05 Thread Richard Quadling

2009/3/5 david :
>
> Hi Richard,
>
> not tested, just thought: does it works with DOM0 event ??
>
> --
> david
>
> On 26 fév, 16:22, Richard Quadling  wrote:
>> Hi.
>>
>> Below is a simple example of the problem I'm having.
>>
>> In FF and Chrome, the change event is bubbled to the dynamicContainer.
>> In IE it isn't.
>>
>> Am I doing something wrong? Is there a workaround?
>>
>> I don't want to watch "click" as it happens as you go into and out of
>> the select.
>>
>> Something else I noticed about Chrome is that the OPTION never
>> triggers the event, or at least in the way I'm testing it, only
>> Firefox ever has the event fired on an OPTION.
>>
>> Ideas/suggestions warmly welcomed.
>>
>> Regards,
>>
>> Richard.
>>
>> 
>> 
>> > src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js";>
>> 
>> function watchEvents(ev){
>>   var el = ev.element();
>>   if ('option' == el.tagName.toLowerCase()){
>>     el = el.up('select');
>>   }
>>
>>   $('watchedEvents').update(
>>     ev.element().tagName + ' / ' +
>>     ev.element().id + ' / ' +
>>     el.tagName + ' / ' +
>>     el.id + ' / ' +
>>     ev.type + '
' + >>     $('watchedEvents').innerHTML >>   ); >> >> } >> >> document.observe('dom:loaded', function(){ >>   $('dynamicContainer') >>     .observe('click', watchEvents) // So I can see when clicks occur - >> not in my real code. >>     .observe('change', watchEvents) >>     .observe('keyup', watchEvents);}); >> >> >> >> >>   >>     >>       One >>       Two >>       Three >>       Four >>     >>   >> >> >> >> >> >> -- >> - >> Richard Quadling >> Zend Certified Engineer :http://zend.com/zce.php?c=ZEND002498&r=213474731 >> "Standing on the shoulders of some very clever giants!" > > > Sorry for being such a newbie, but can you explain that? -- - Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!" --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---

[Proto-Scripty] Re: Having an issue with bubbling of a SELECT's onChange event in IE.

2009-03-05 Thread Walter Lee Davis


On Mar 5, 2009, at 9:44 AM, Richard Quadling wrote:

>
> 2009/3/5 david :
>>
>> Hi Richard,
>>
>> not tested, just thought: does it works with DOM0 event ??
>>
>> --
>> [snip]
>
> Sorry for being such a newbie, but can you explain that?
>
> -- 
> -

I think he means if you use an inline 'onchange' event handler.

Walter



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---