Skip to content

Instantly share code, notes, and snippets.

@Luke-23ae
Created October 18, 2010 13:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Luke-23ae/632230 to your computer and use it in GitHub Desktop.
Save Luke-23ae/632230 to your computer and use it in GitHub Desktop.
Layout = {
settingsToSave: {},
saveSettings: function(data) {
Layout.settingsToSave[data[0]] = data[1].value;
},
submitSettings: function() {
new Ajax.Request('view_ax.php?submit__layout__update_settings', {
method: 'post',
parameters: Layout.settingsToSave,
onSuccess: function(response) {
if(!response.responseJSON.success) {
alert(response.responseJSON.errormessage);
return false;
}
console.log(Layout.settingsToSave);
}
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment