Plugins - Responds to Parent

StarAdd to favorites

Adds responds_to_parent to your controller to respond to the parent document of your page. Make Ajaxy file uploads by posting the form to a hidden iframe, and respond with RJS to the parent window.

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

Sean Treadway

http://sean.treadway.info/responds-to-parent/

http://responds-to-parent.googlecode.com/svn/trunk

Rails' (MIT)

  • Currently 4.1/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Controllers

Tags

Comments

Add a comment
Vitali 27 Nov 2007

http://sean.treadway.info/2007/11/12/responds-to-parent-resurrected/

Dmitry 17 Oct 2007

Wonderful resource, the only problem is that http://sean.treadway.info/svn/plugins/responds_to_parent/ seems to be down... :(

Any alternative location for this pluging?

Search Plugins

Query syntax

Plugins by Category

Sponsors

Rails Kits: Get Code. Get Moving.

Have a comment?