Not necessarily. It's more just a habit that I write 'success' in there from other things with callbacks. In this case - function(success) - success is what gets returned from the API call meaning you didn't have any syntax errors - you could write function(data) and get the same result. Data, Success, its just a name that you can use later in the function if you have something where you need to interpret the response.
So for example if you were doing an AddRecord call - and wanted to grab the RID of the new record that gets created - you would do something like:
function(success) {
var rid = success.getElementsByTagName.....('rid')
**The above syntax is way - just example.
I just have a habit of writing success for some reason now when I post here. You could just as easily do
$.get('',function() {
location.reload()
})
and be just fine without putting anything in there.
Chayce Duncan | Director of Strategic Solutions
(720) 739-1406 |
chayceduncan@quandarycg.com Quandary Knowledge Base