Files
zurawik.pl/Static/script/UploadFile.js
2026-05-15 18:33:51 +02:00

54 lines
888 B
JavaScript

//function CheckExt(value) {
//
// if (value)
//
//
//}
function CheckExt(file, url) {
new Ajax.Request(url,
{
method:'post',
parameters: {file: file},
onSuccess: function(transport){
var response = transport.responseText;
eval(response);
},
onFailure: function(){ alert('Something went wrong...') }
});
}
//
//function DeletePhoto(url, photo) {
// new Ajax.Request(url,
// {
// method:'post',
// parameters: {photo: photo},
// onSuccess: function(transport){
// var response = transport.responseText;
// eval(response);
//
// },
// onFailure: function(){ alert('Something went wrong...') }
// });
//
//}
function DeletePhoto(url, photo) {
$.ajax({
type: "POST",
url: url,
cache: false,
data: ({photo: photo}),
success: function(html){
//$("#longer").show();
//$("#categoryOptions").html(html);
$('#image_'+photo).hide();
}
});
}