Created
December 8, 2011 16:11
-
-
Save richardbenson/1447457 to your computer and use it in GitHub Desktop.
Specify as many or as few options as you go
This file contains hidden or 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
$.ajaxSetup({ | |
url: '/api/', | |
type: 'POST', | |
dataType: 'json' | |
}); | |
//------ e.g. 1, just need to specify data | |
$.ajax({ | |
data: 'serverid=' + YAMS.admin.selectedServer + '&action=save-server-settings&' + $('#settings-form').serialize() | |
}); | |
//------ Or do a full request, but the next one will go back to defaults | |
$.ajax({ | |
url: '/assets/parts/apps-page.html', | |
type: 'GET', | |
dataType: 'text', | |
success: function (data) { | |
$('#apps-tab').html(data); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment