I posted this on Rick's Beast forum but got zilch so I am gonna try it here:
Ok, I have been fiddling with this trying to integrate it into my app.
I believe I¹m just having a bit of trouble with the last part
In the example, the upload action doesn¹t really return, it renders some
text¹, that basically then invokes a cleanup¹ method on the JavaScript.
Well, I want to do a few of my own things when the action finishes so I was
thinking, RJS Well, I¹m having trouble. Basically, the JavaScript is being
rendered as text in the iFrame (Safari 2.0).
I have this code at the end of my upload action:
render :update do |page|
page << "window.parent.UploadProgress.finish();"
page.insert_html :before, 'file_upload_box', :partial =>
'/collection/file_item', :locals => {:file_item => @new_pd_file}
page.visual_effect :fade, "[EMAIL PROTECTED]"
end
The idea is that it calls the JavaScript finish and then it inserts a new TR
in my table, showing the item that was just uploaded. Instead I just see the
rendered JavaScript in the iFrame.
Any ideas why this isn¹t working? What am I doing wrong?
_______________________________________________
Mongrel-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/mongrel-users