Hi,
You have to remove (). You need to pass a function as argument, but now you
are calling it and pass the result the the function.
Event.observe(window, "load", sM.init);
Regards,
Nico
On 3/19/06, Peter Michaux
<petermichaux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
> Hi,
>
> I am trying to use prototype.js to observe when a page has loaded and
> then call a handler function to initialize a javascript dropdown menu.
> I''ve done it without prototype but I would rather use prototype
and
> remove some of my code. I tried this
>
> Event.observe(window, "load", sM.init());
>
> It doesn''t work.
>
> What to try next?
>
> Thanks,
> Peter
> _______________________________________________
> Rails-spinoffs mailing list
> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs