public Method

PrototypeHelper.update_page(&block)

Yields a JavaScriptGenerator and returns the generated JavaScript code. Use this to update multiple elements on a page in an Ajax response. See JavaScriptGenerator for more information.

Example:

update_page do |page|
  page.hide 'spinner'
end

Source Code

# File action_view/helpers/prototype_helper.rb, line 991
def update_page(&block)
  JavaScriptGenerator.new(@template, &block).to_s
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.