I feel its important to point out that prototype isn't like dojo.

From what I briefly read (to get a proper explaination) is that dojo is a
toolkit. That is 'widget' (bits of code you can drop in to do functionality)
and 'event' based,
whereas prototype (which i am more familiar with) is more of a framework
which extends Javascript to allow you to do some very cool flexible
manipulations of data and acomplish tasks much quicker than you would if you
were writing normal base javascript.
Scriptaculous is an addon to Prototype (in that it uses prototype internally
and is designed to go with it) that offers a few widget style
functionalities, such as drag and drop sorting and autocomplete text boxes.

So the original question of can I do iframe/ajax dynamic file uploads with
prototype?
Sure, if you code something to use the prototype methods/dom extensions to
save the amount of code you have to write.
As a prebuilt object you can just add into your page? Nope.

Prototype has tonnes of features to help you here, such as the new Element
constructor (actually i think this might be 1.6, not 1.5.1), but you can use
the scriptaculous Builder syntax..
to Create the iframe, and attach events to button presses/image clicks to
invoke your fileupload dialog.
I haven't read too much about how to do one of these uploads recently but as
far as I know, a dummy webpage with a standard fileupload form is put into
an iframe, which is manipulated via javascript via cross frame scripting to
invoke the file dialog and submit the form.
This iframe submits to a server script and returns the information about the
file to the calling window/frame which then notifies the user their
requested upload has completed.

As for Sebastien's question, someone else will need to answer that.

Gareth

On 7/10/07, Sébastien Gruhier <[EMAIL PROTECTED]> wrote:
>
> Am I wrong or SWFupload send all files as octet-stream so you are not able
> to get mime type in a rails application? Seb
>
>  On Jul 10, 2007, at 9:40 AM, Peter De Berdt wrote:
>
>  Dojo uses the iframe trick IIRC. You could look into:
>
>
> http://sean.treadway.info/articles/2006/05/29/iframe-remoting-made-easy
> http://sean.treadway.info/demo/upload/
> http://www.ruby-forum.com/topic/113636
>
>
> I prefer to use SWFUpload, because of its many clientside filtering
> abilities:
> http://swfupload.mammon.se/
> Also look into this should you use SWFUpload:
> http://blog.inquirylabs.com/2006/12/09/getting-the-_session_id-from-swfupload/
>
>  On 10 Jul 2007, at 08:10, david wrote:
>
>  Dojo (AJAX Framework) has something like IFrameIO which allows to
> upload files from form to server without reloading page, but the whole
> my page right now is written using prototype framework. Does prototype
> has something that I could use to get the same result? (Before I start
> editing my few thousands of code lines)
>
>
>  Best regards
>
>
> Peter De Berdt
>
>
>
>
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to