cloudconvert - Dropzone.js, how to refresh the page after action url is terminated -


i use dropzone.js upload files server. create dropzones programmatically inside existing form. "url" parameter send $_files array dropzone.php file send files submitted cloudconvert convert them pdf file.

dropzone refresh initial page after files sent , not wait running process in dropzone.php ($process->wait();).

i can not find way force dropzone.js wait until action done.

any idea ?

as dropzone form inside form, dropzone send main form immediatly after file upload , not wait dropzone verification process.

to prevent this, allow main form validated if click submit button.

<script> $(document).ready(function() {     dropzone.autodiscover = false;      //avoid form submitted dropzone     var form_clicked = false;     $('#submit_button').click(function() {         form_clicked = true;     });     $("#submit_my_form").submit(function(e) {         if(form_clicked != true){            e.preventdefault();         }     });     // submit main form refresh page after file upload     my_dropzone.on("successmultiple", function(file, responsetext) {         $('#submit_button').click();     }); </script> 

Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -