I have a call to ajax which seems to execute properly, but I can't set a breakpoint in the success section of the call. The underlying database is changed and I want to return a value of the number of items that have been changed in 'tppunk'. In debugging with Firebug, the debugger doesn't stop in 'success' even though it does succeed. Instead, I jump to the code after the call and 'tppunk' is identified as undefined. Here's my code:
var json = {'tagset': tagset}
var tppunk;
$.ajax({
url: clr_url_base+'savetags.php?data='+encodeURIComponent($.toJSON(json)),
type: 'GET',
success: function (d) {
tppunk = d;
$('h2').removeClass("changed");
$('h2').addClass("saved");
},
complete: function () {
$('h2').removeClass("changed");
$('h2').addClass("saved");
}
});
if(corp == "CPA")
window.opener.$('span.tppunk').text(tppunk);