Created
March 26, 2013 17:06
-
-
Save mangantj/5247159 to your computer and use it in GitHub Desktop.
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
$(function () { | |
$("#setFeesToPaid").click(function () { | |
var checkedUnPaidFees = $("input[name=paid]:checked"); | |
if (checkedUnPaidFees.length > 0) { | |
$.ajax({ | |
url: "/Fees/SetFeesToPaid", | |
type: "POST", | |
dataType: "JSON", | |
data: JSON.stringify(collectCheckBoxIds(checkedUnPaidFees)), | |
contentType: 'application/json; charset=utf-8', | |
success: function (data) { | |
//alert("Me Data Here"); | |
} | |
}); | |
} | |
}); | |
}); | |
function collectCheckBoxIds(inputCollection) { | |
var Ids = []; | |
$(inputCollection).each(function () { | |
var id = $(this).attr('data-id'); | |
Ids.push(id); | |
}); | |
return Ids; | |
} | |
public ActionResult SetFeesToPaid(Fee data) | |
{ | |
//GOING TO DO STUFF | |
return Json(new | |
{ | |
bob = "JELLO" | |
}, | |
JsonRequestBehavior.AllowGet); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment