Advertisement
Guest User

Untitled

a guest
Sep 15th, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. Home.php
  2.  
  3. <form action="../index.php" class="dropzone" id="my-awesome-dropzone">
  4. <h2 style="font-size:14px;">Upload your subtitle file</h2>
  5. </form>
  6.  
  7. <?php if (!empty($new_name)) echo $new_name;?>
  8.  
  9. <script>
  10. Dropzone.autoDiscover = false;
  11.  
  12. $(function() {
  13. var myDropzone = new Dropzone("#my-awesome-dropzone");
  14. myDropzone.on("queuecomplete", function(file) {
  15. // Called when all files in the queue finish uploading.
  16. window.location = "../index.php";
  17. });
  18. });
  19. </script>
  20. ===============================
  21. index.php
  22. // Code to move file for specific directory works fine..
  23. $response = $this->view->render($response, "home.php",array(
  24. 'errors' => array($errors),
  25. 'new_name' => $new_name
  26. ));
  27.  
  28. return $response;
  29. ===============================
  30. my page localhost:6666 when I upload a file it changes to localhost:6666/index.php but doesn't render to localhost:6666 again !
  31. This is works fine if I don't use the jQuery answer but it don't in the active page.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement