$.ajax({ type: 'POST', url: "path/to/url", data: {'data': data}, success: function (msg) { alert(msg); } });