The below is the file upload script
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script>
$(document).ready(function(e){
e.preventDefault();
$('#submitbtnId').click(function(){
var formData = new FormData($('#formId'));
$.ajax({
type:'POST',
url:'update.php',
data: formData,
cache:'false',
success: function(res){alert(res);}
});
return false;
});
});
</script>
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script>
$(document).ready(function(e){
e.preventDefault();
$('#submitbtnId').click(function(){
var formData = new FormData($('#formId'));
$.ajax({
type:'POST',
url:'update.php',
data: formData,
cache:'false',
success: function(res){alert(res);}
});
return false;
});
});
</script>
0 comments:
Post a Comment