I\'m looking for a way to submit only changed form fields to the server. So, let\'s say I have a form
Another option would be to mark the fields as disabled
before they are submitted. By default disabled
fields will not be serialized or submitted with a default form post.
Simple example:
function MarkAsChanged(){
$(this).addClass("changed");
}
$(":input").blur(MarkAsChanged).change(MarkAsChanged);
$("input[type=button]").click(function(){
$(":input:not(.changed)").attr("disabled", "disabled");
$("h1").text($("#test").serialize());
});
on jsfiddle.