Is it possible to send data via ajax or post and not to define url? This is the code I am trying to work:
$("#gll_delete").click(function(){
var gll = $("#gll").val();
var gll_string = gll.split(' ');
var gll_id = gll_string[0];
console.log(gll_id);
var data = "gll_id=" + gll_id;
$.ajax({
type : "POST",
data : data
});
});
You need to specify a destination for this request. If it should be the same page (like an empty action attribute on a html form reacts) you could do:
url: location.href
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With