On Jul 20, 2006, at 3:17 PM, Shanti Braford wrote:

Hey all,

I haven't seen much discussion on this yet here so I thought I'd bring it up.

Kyle Maxwell has a workaround plugin for the problem of form_tag_remote with multipart file uploads:
http://svn.kylemaxwell.com/form_remote_upload/trunk/

To those unfamiliar with the hack, it involves using a hidden iframe that's posted to via a regular form submit (as opposed to the usual form_remote_tag Ajax.Request method).

The problem is that any resulting _javascript_ sent back via that kind of call, even if eval'd somehow, gets eval'd inside the the context of the hidden iframe, as opposed to the main page (where it would be much more useful).

I guess I was just wondering if:

A) Anyone had come up with a clever solution to this problem, such that resulting _javascript_ could still be eval'd in the page context (as opposed to the hidden iframe's)?

and

B) If Anything like this would ever be considered for rails core?

Thanks,

- Shanti


I just finished dealing with this exact situation. I didn't like the form_remote_upload and looked for another option. I found a better plugin here:  http://sean.treadway.info/svn/plugins/responds_to_parent/README

It lets your use respond_to_parent and an rjs block to get your rjs to eval in the parent window. Works well.

-Ezra

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

Reply via email to