first commit
This commit is contained in:
53
_rejestracja/Static/script/UploadFile.js
Normal file
53
_rejestracja/Static/script/UploadFile.js
Normal file
@@ -0,0 +1,53 @@
|
||||
//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();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user