kwangu

Access permission

May 23rd, 2015
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(document).ready(function (e) {
  2. $("#uploadimage").on('submit',(function(e) {
  3. e.preventDefault();
  4. $("#message").empty();
  5. $('#loading').show();
  6. $.ajax({
  7. url: "<?php echo base_url(); ?>" + "index.php/upload/upload_file", // Url to which the request is send
  8. type: "POST",             // Type of request to be send, called as method
  9. data: new FormData(this), // Data sent to server, a set of key/value pairs (i.e. form fields and values)
  10. contentType: false,       // The content type used when sending data to the server.
  11. cache: false,             // To unable request pages to be cached
  12. processData:false,        // To send DOMDocument or non processed data file it is set to false
  13. success: function(data)   // A function to be called if request succeeds
  14. {
  15. $('#loading').hide();
  16. $("#message").html(data);
  17. }
  18. });
  19. }));
  20.  
  21.  
  22. });
Add Comment
Please, Sign In to add comment