function send(el) {
var url = el.getAttribute('href');
var msg = prompt('Сообщение');
// переходим по url с передачей POST'ом msg
$.ajax({
type: 'POST',
url: 'url.php',
data: 'name=' + name,
cache: false,
success: function(response) {
location.href = 'ссылка куда-то';
},
error: function(xhr, status, errorThrown) {
alert(errorThrown + '\n' + status + '\n' + xhr.statusText);
}
});
return false;
}
Access-Control-Allow-Origin: *
header("Access-Control-Allow-Origin: *");