Skip to content

Commit

Permalink
alert on data save or fail, resolves radumas#52 minimally
Browse files Browse the repository at this point in the history
  • Loading branch information
whilei committed Jul 1, 2016
1 parent 4ac2a87 commit b0ea141
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -496,11 +496,16 @@
dataType: 'json',
success: function(responseData, textStatus, jqXHR) {
console.log("Data saved");
// Alerts are system-owned (ui-wise) dialogs.
// There will probably be an 'OK' button for user to confirm that
// they've seen the message.
// Alternatively you could use the Jquery dialogs like you're doing.
alert('Woohoo! Your input has been saved! Thank you!');

},
error: function (responseData, textStatus, errorThrown) {

console.log("Problem saving the data");
console.log("Problem saving the data");
alert('Oh no! Your input wasn\'t saved :-(\n' + errorThrown + ': ' + textStatus);
}
});

Expand Down

0 comments on commit b0ea141

Please sign in to comment.