limburgie / php-movico

Automatically exported from code.google.com/p/php-movico
0 stars 0 forks source link

File Upload does not work when ajax is enabled #30

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
See 
http://stackoverflow.com/questions/166221/how-can-i-upload-files-asynchronously-
with-jquery to this subject and the possible solutions

Original issue reported on code.google.com by limburgie on 11 Dec 2010 at 8:39

GoogleCodeExporter commented 9 years ago
This is the only component up to now that doesn't work with AJAX!

Original comment by limburgie on 19 May 2011 at 1:27

GoogleCodeExporter commented 9 years ago
http://www.ajaxf1.com/tutorial/ajax-file-upload-tutorial.html

Use an invisible iframe to upload the file to. When complete, send back an 
event to the parent window. 

Original comment by limburgie on 23 May 2011 at 1:28

GoogleCodeExporter commented 9 years ago
# Submit synchroneously to an iframe, setting a GET parameter e.g. upload=1 + 
enable loading animation
# When a view is loaded with this GET parameter, a <script> tag should be 
rendered right before the </body> close tag:
<script type="text/javascript">
$("body", window.parent.document).html($("body").html());
</script>
</body>

The view is now replaced by the result, just what we want!

Original comment by limburgie on 8 Jun 2011 at 12:52

GoogleCodeExporter commented 9 years ago

Original comment by limburgie on 8 Jun 2011 at 1:16