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 <[EMAIL PROTECTED]> 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@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to