Is there any way to delete files from folder using javascript..? Here is my function
function deleteImage(file_name)
{
var r = confirm(\"Are you
You can not delete files with javascript for security reasons.However, you can do so with the combination of server-side language such as PHP, ASP.NET, etc using Ajax. Below is sample ajax call that you can add in your code.
$(function(){
$('a.delete').click(function(){
$.ajax({
url:'delete.php',
data:'id/name here',
method:'GET',
success:function(response){
if (response === 'deleted')
{
alert('Deleted !!');
}
}
});
});
});