I am trying to send some information to my php page via an ajax call. However I am getting an issue that a } missing after property list. Below is my code:
function article(Article){
var surl = "http://www.webapp-testing.com/includes/article_desc.php";
var id = 1;
$.ajax({
type: "POST",
url: surl,
data: '"Article="+Article';
dataType: "jsonp",
cache : false,
jsonp : "onJSONPLoad",
jsonpCallback: "articlecallback",
crossDomain: "true",
success: function(response) {
alert("Success");
},
error: function (xhr, status) {
alert('Unknown error ' + status);
}
});
}
Any help will be greatly appreciated
Change the ;
after your data
attribute to a ,
.
data: '"Article="+Article',
This string should end with ,
:
data: '"Article="+Article';
You have a semicolon after the "data" element. It should be a comma.
replace the the semicolon on line data: '"Article="+Article';
with ,