Okay for those people interested I have this now working, I'll post something a bit later with the simplest example I can clobber together, thanks for the hint.
I took inspiration from http://www.anyexample.com/programming/php/php_ajax_example__asynchronous_file_upload.xml The important bit which I missed was you target your form to the hidden iframe. <form action="script.php" target="upload_iframe" method="post" enctype="multipart/form-data"> <label for="file">text file uploader:</label><br> <input type="file" name="file" id="file"> </form> <iframe name="upload_iframe" style="width: 400px; height: 100px; display: none;"></iframe> Once I figured out how that worked it clicked On Jun 8, 9:39 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hmm SWF upload may not be feasible, but Im going to look into the > hidden iframe idea, any further information appreciated. > > On Jun 8, 12:42 am, Peter De Berdt <[EMAIL PROTECTED]> wrote: > > > On 08 Jun 2007, at 00:44, [EMAIL PROTECTED] wrote: > > > > Im really not understanding somthing with Prorotype, what I want to do > > > is call a piece of php that accepts a file from a form, process it and > > > return a very simple true/false. Now Ive been playing with it inside > > > of a form element and so far have this. > > > <form id='test' enctype="multipart/form-data" action='' > > > method='post' onsubmit="addImage( 'test' ); return false;"> > > > <input type="file" name="file" id="file"/> > > > <input type="submit"/> > > > </form> > > > > The script seams to suceed, not nothing ever reaches the PHP, what am > > > I doing wrong? > > > This has been beaten to death already, but here we go again: you > > can't upload files through ajax because of javascript security. You > > could use something like SWFUpload to mimic this behavior or use a > > hidden iframe. Just google it up and you'll find plenty of resources > > on this matter? > > > 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 -~----------~----~----~----~------~----~------~--~---
