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 http://sproutit.com/ http://sablog.com/ Other threads on this topic: http://lists.rubyonrails.org/pipermail/rails/2006-July/051037.html _______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core
Ezra Zygmuntowicz
2006-Jul-20 22:35 UTC
Re: Elegant solutions to multi-part ajax file uploads?
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
Chris McGrath
2006-Jul-21 01:34 UTC
Re: Elegant solutions to multi-part ajax file uploads?
On 20 Jul 2006, at 23:35, Ezra Zygmuntowicz wrote:> On Jul 20, 2006, at 3:17 PM, Shanti Braford wrote: > >> >> 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/ >><snipped stuff>> 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 >+1 I''m using it too. Works well. Chris _______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core