Hi all,
In the documentation: http://manuals.matrix.squizsuite.net/web-services/chapters/javascript-api it mentions for most operations/requests that there is a response and a Custom Callback Function.
The callback function is obviously a function that you define and set, however is this only fired ONCE/IF the request is complete, or is it fired after the request is sent?
How do I access the response? If it is accessed through the customcallbackFunction that I set, how would I structure said function to gain the callback? Should these manuals be updated or am I retarded?
For arguments sake, let's say I use setMetadata :
js_api.setMetadata({ "asset_id":100, "field_id":900, "field_val":"metadata", "dataCallback":customDataCallbackFunc })
How would I know if and when this request has been completed (using ajax), as sometimes the metadata hasn't shown the change for up to 20 secs?
Note: this delay could be due to our internal network speed, however I'd still like to be able to utilise a response that fires only when the change has gone through.
Thanks all and Nick in advance.