CC-4583: Use AJAX calls instead of refreshing entire page

-done
This commit is contained in:
denise 2012-10-26 18:09:30 -04:00
parent 0ab1353564
commit 3a7700eaac
12 changed files with 185 additions and 82 deletions

View file

@ -88,6 +88,17 @@ $(document).ready(function() {
$(this).toggleClass("closed");
return false;
}).next().hide();
$('#pref_save').live('click', function() {
var data = $('#pref_form').serialize();
var url = baseUrl+'/Preference/index';
$.post(url, {format: "json", data: data}, function(data){
var json = $.parseJSON(data);
$('#content').empty().append(json.html);
setTimeout(removeSuccessMsg, 5000);
});
});
showErrorSections();