Last active
June 10, 2016 21:08
-
-
Save jeffbicca/9b1bfb4e9b852c1b55c41b068c0b8790 to your computer and use it in GitHub Desktop.
Adjusting indentation.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#submitButton").click(function() { | |
$.ajax({ | |
type : "POST", | |
url : "api/cart", | |
contentType : "application/json", | |
data : JSON.stringify(cartItems), | |
success : function(data, status, xhr) { | |
var dataEnc = window.btoa(unescape(encodeURIComponent(JSON.stringify(data)))); | |
$.redirect('/virtual-store/confirm.html', dataEnc); | |
$('#jsonForm').capture(); | |
$('#jsonForm').submit(); | |
}, | |
error : function(data, status, xhr) { | |
$('#errors').puidialog('show'); | |
$('#errorMessages')[0].innerHTML = data.responseJSON.error.message; | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment