Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $("button").on("click", function() {
- var Username = $("#Username").val();
- var Password = $("#Password").val();
- var data = { "Username": Username, "Password": Password };
- $.post("http://path.to/api/Action", data, function(data) {
- if (data.IsOk) {
- // REJOICE! The post succeeded
- }
- else {
- // cry because something went wrong
- }
- });
- });
- var Username = $("#Username").val();
- var Password = $("#Password").val();
- var data = { "Username": Username, "Password": Password };
- $.ajax({
- url: "http://path.to/api/Action",
- data: data
- })
- .done(function( msg ) {
- alert("Data saved");
- getReceipts();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement