Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (Request.IsAjaxRequest())
- {
- return Content("/receipt/latest");
- }
- else
- {
- return RedirectToAction("latest", "receipt");
- }
- function manageResponse(responseText, statusText) {
- if (responseText.toString().substr(0, 1) == '/') {
- window.location = responseText;
- }
- else {
- $("#formResult").text(responseText);
- }
- }
- var options = {
- beforeSubmit: function() {
- return $('#login').validate().form();
- },
- success: manageResponse
- };
- $('#login').validate(); // setup form to use validation plugin
- var options = {
- beforeSubmit: function() {
- return $('#login').valid(); // check form is valid
- },
- success: manageResponse
- };
Add Comment
Please, Sign In to add comment