PHP Classes

File: index.html

Recommend this page to a friend!
  Classes of Ravi Kumar  >  PHP AJAX Upload file  >  index.html  >  Download  
File: index.html
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP AJAX Upload file
Process image files uploaded via AJAX
Author: By
Last change: Initial Commit
Date: 8 months ago
Size: 723 bytes
 

Contents

Class file image Download
<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Ajax Upload</title>
	<link rel="stylesheet" href="assets/css/style.css">
</head>
<body>
	
	<form action="image.php" method="post" enctype="multipart/form-data" class="uploadForm">
		<input type="file" name="image" class="image">
	</form>
	<div id="preview"></div>

	<script src="assets/js/jquery-1.10.1.min.js"></script>
	<script src="assets/js/jquery.form.js"></script>
	<script>
		jQuery(document).ready(function($){
			
			$('.image').on('change', function(){

				$('#preview').html('<img src="assets/img/loader.gif" alt="Uploading...."/>');
				$('.uploadForm').ajaxForm({ target: '#preview' }).submit();
			});

		});
	</script>	
</body>
</html>
For more information send a message to info at phpclasses dot org.