Reputation: 63
my browser keeps shouting at me with the syntax error: missing } after property list, and I have no idea why. Here's the relevent code. Thanks in advance.
function addToDb()
{
var source = "SoundCloud";
var partyKey = "4";
var id = "0987654321";
jQuery.ajax({
type: "POST",
url: 'connect.php',
dataType: 'json',
data: {functionname: 'addSong', arguments: [id, source,partyKey]},
success: window.alert("check your db"); //here I get the error
});
};
Upvotes: 0
Views: 591
Reputation: 27247
success
should be a function.
success: window.alert("check your db");
});
ought to be:
success: function() { window.alert("check your db"); }
});
Upvotes: 4