RJS scope problem?

Hey all,
I do this in a controller:


render :update do |page|
page.replace_html …
page.show(‘spinner’)

MyModule.submit()

page.replace_html …
page.hide(‘spinner’)
end

I get an 'undefined method error" for the ‘submit’ function.
If the RJS is NOT there, this function resolves correctly. How can I
call the function from my module from within an RJS block?

Thanks,
Vishal

templates aren’t rendered in the scope of the controller. instance
variables are carried across, but that’s it.
helper_method lets you make methods from your controller accessible to
views, or you can also put code in the helper file for your controller.

Fred