If you have a form like so : <form target="uploadDiv" action="http://path/to/handler"> <input type="file" name="filename" /> <input type="submit" value="Submit" /> </form>
<iframe name="uploadDiv" style="width:0px; height:0px" url="_blank" /> Then, when the submit button will be pressed, your page will not refresh, but it's the iframe that will be used to send the data from the form to the action url to the server. For the rest, look on how to send javascript to an iframe to talk with the javascript in you Web app. Or set up a timer that will look for any change in the iframe... Do not make the iframe invisible. Some browser don't like that. Rather use a 0 sized iframe (like suggested). I could send you a script I wrote to send multiple files asynchronously using a PHP script and an iframe (with a little control over the file queue ; pause, stop, restart, etc.) But the code is not well documented (though not really hard to understand). I just went on with SWFUpload instead as I needed something to upload multiple files with progress bar all on client side. Cheers. yanick On Jul 10, 4:52 am, david <[EMAIL PROTECTED]> wrote: > After big pane for a while in my ass I managed to make it work with > Dojo, but I started to think do I really want it? And the answer is > no. Dojo is huge, it's more complex and I must rely on it's methods, > while on prototype almost everything is done by myself. > > I have two ideas left, I will try to make it with prototype with > iframe or do it the easiest way, just plain upload script and small > pop-up window. I don't know why, but I really don't want to have > something huge like Dojo in my source code. In some way it reminds me > JAVA/C#. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
