Response To Parent plugin

Plugin details

Adds responds_to_parent to your controller to respond to the parent document of your page.

Websitehttp://sean.treadway.info/articles/2006/05/29/iframe-remoting-made-easy Repositoryhttp://sean.treadway.info/svn/plugins/responds_to_parent/ Author Sean Treadway Tags response LicenseMIT

Documentation

Install the plugin:
ruby script/plugin install http://sean.treadway.info/svn/plugins/responds_to_parent/

Example
=======

Controller:

  class Test < ActionController::Base
    def main
    end
 
    def form_action
      # Do stuff with params[:uploaded_file]
        
      responds_to_parent do
        render :update do |page|
          page << "alert($('stuff').innerHTML)"
        end
      end
    end
  end
 


main.rhtml:

  < html>
    < body>
      < div id="stuff">Here is some stuff
 
      < form target="frame" action="form_action">
        
        
      
 
      
    
  
  

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | (0 older versions) | Last edited by: hardway, about 1 year ago