Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <form id="myForm"  action="action.php" method="post">
  2.   <input type="file" name="upfile">
  3.     <input type="hidden" name="MAX_FILE_SIZE" value="10000">
  4.     <input type="submit" value="Upload">
  5. </form>
  6. <div style="margin-top:15px;" id="htmlExampleTarget"></div>
  7.  
  8.     <script>
  9.     // prepare the form when the DOM is ready
  10. $(document).ready(function() {
  11.     // bind form using ajaxForm
  12.     $('#myForm').ajaxForm({
  13.         // target identifies the element(s) to update with the server response
  14.         target: '#htmlExampleTarget',
  15.  
  16.         // success identifies the function to invoke when the server response
  17.         // has been received; here we apply a fade-in effect to the new content
  18.        // success: function(data) {
  19.         //    $('.data').html(data);
  20.         //}
  21.     });
  22. });
  23.     </script>
  24. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.js"></script>
  25. <script src="http://malsup.github.com/jquery.form.js"></script>