Hey there,
Pong a écrit :> <script>
> function hello(e){
> alert(Event.element(e) + '' clicked'');
> Event.stop(e);
> }
>
> Event.observe(window, ''load'', function() {
> Event.observe($(''test''), ''click'',
hello);
> });
> </script>
This does work in FF. Perhaps the context of your code isn''t right.
Can you put your sample page online so we can check the whole thing out?
BTW, you don''t need to explicitely $() the ID for
Event.observe''s first
argument: like just about any element-based function in Prototype, it
will $() its argument automatically.
--
Christophe Porteneuve aka TDD
tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---