Update database with $.post() and download link
Hi,
I am trying to update the database as soon as a link is clicked which downloads an image
But it seems not not to work with a link containing an image to download. If it is a normal text link iit works. How weird is that?
Any idea? Thanks in advance.
Here's some simple test code:
- $(function(){
$('.btn_download').click(function(){
var senddata = { action: 'change_interface', interface_value: '1' };
$.post('daten.php', senddata, function(data){
$('#console').html(data);
data_new = $.trim(data)
if (data_new == 'successo') {
//do sth
}
if(data_new=='Invalid data') {
//do sth
}
});
});
});