I'm trying to use the $ .post method to call a web service, it works for me using the $ .ajax method:
$.ajax({ type: "POST", url: "StandardBag.aspx/RemoveProductFromStandardBag", data: "{'standardBagProductId': '" + standardBagProductId.trim() + "' }", success: function(){ $((".reload")).click(); }, dataType: "json", contentType: "application/json" });
But when I transfer the same method to the $ .post method, it will not work:
$.post("StandardBag.aspx/RemoveProductFromStandardBag", "{'standardBagProductId': '" + standardBagProductId.trim() + "' }", function () { $((".reload")).click(); }, "json" );
What am I missing?
Martinffx Sep 23 '11 at 12:12 2011-09-23 12:12
source share