1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
| //******************************************************
//Show thumbnail
//******************************************************
var request = $.ajax({
method: "GET",
url: "inc/thumbnail.php",
data: "ID=1",
dataType: "html",
})
request.done(function( msg ) {
$( "#showUploadedFiles" ).html( msg );
});
request.fail(function( jqXHR, textStatus ) {
alert( "Request failed: " + textStatus );
});
//*******************************************************
$("form#data").change(function(event){
//disable the default form submission
event.preventDefault();
//grab all form data
var formData = new FormData($(this)[0]);
$.ajax({
url: "inc/ajax.php",
type: "POST",
data: formData,
async: false,
cache: false,
contentType: false,
processData: false,
success: function (returndata) {
//alert(returndata);
//window.location.reload(true);
//********************************************************
var request = $.ajax({
method: "GET",
url: "inc/thumbnail.php",
data: "ID=1",
dataType: "html",
})
request.done(function( msg ) {
$( "#showUploadedFiles" ).html( msg );
});
request.fail(function( jqXHR, textStatus ) {
alert( "Request failed: " + textStatus );
});
}
});
return false;
}); |
Partager