2009/3/5 david <david.brill...@gmail.com>:
>
> Hi Richard,
>
> not tested, just thought: does it works with DOM0 event ??
>
> --
> david
>
> On 26 fév, 16:22, Richard Quadling <rquadl...@googlemail.com> 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.
>>
>> <html>
>> <head>
>> <script type="text/javascript"
>> src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js";></script>
>> <script type="text/javascript">
>> 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 + '<br />' +
>>     $('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);});
>>
>> </script>
>> <body>
>> <div id="dynamicContainer">
>>   <form method="post" action="">
>>     <select id="aSelector" name="bob">
>>       <option value="1">One</option>
>>       <option value="2">Two</option>
>>       <option value="3">Three</option>
>>       <option value="4">Four</option>
>>     </select>
>>   </form>
>> <div>
>> <div id="watchedEvents"></div>
>> </body>
>> </html>
>>
>> --
>> -----
>> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to