Created
May 26, 2010 12:59
-
-
Save jonhilt/414436 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
$('#saveChanges').click(function () { | |
var rules = new Array(); | |
$('#assignedRules table.ruleTable tbody tr').each(function (i) { | |
var subRuleCode = $('#subRuleCode', this).val(); | |
var productGroupId = $('#productGroupId', this).val(); | |
rules.push(new Rule(subRuleCode, productGroupId)); | |
}); | |
var postData = JSON.stringify(rules); ; | |
$.ajax({ | |
url: '/rule/SaveUserRules', | |
data: postData, | |
contentType: 'application/json', | |
dataType: 'json', | |
type: 'post', | |
success: onRulesSaved, | |
error: function (data, textStatus) { alert(textStatus); } | |
} | |
); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment