Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
dev:translator_coding [2011/04/10 17:35] – more info ajlyondev:translator_coding [2011/04/10 17:40] – [Saving Multiple Items] ajlyon
Line 98: Line 98:
  
 ''Zotero.Utilities.doPost(url, postdata, callback, charset)'' sends a POST request to the specified URL (not an array), with the POST string defined in ''postdata'' and then calls function ''callback'' with two arguments: response string, and the response object. The optional ''charset'' argument forces the response to be interpreted in the specified character set. ''Zotero.Utilities.doPost(url, postdata, callback, charset)'' sends a POST request to the specified URL (not an array), with the POST string defined in ''postdata'' and then calls function ''callback'' with two arguments: response string, and the response object. The optional ''charset'' argument forces the response to be interpreted in the specified character set.
- 
-(Need documentation on the xmlhttp object-- link to MDC.) 
  
 ''Zotero.Utilities.processDocuments(url, callback, onDone, charset)'' sends a GET request to the specified URL or to each in an array of URLs, and then calls the function ''callback'' with XXXXX arguments: DOM document object, URL, and XXXX. FIXME the optional ''charset'' argument forces the response to be interpreted in the specified character set. This is approximately the equivalent of ''doGet'', except that it returns DOM document objects instead of strings. ''Zotero.Utilities.processDocuments(url, callback, onDone, charset)'' sends a GET request to the specified URL or to each in an array of URLs, and then calls the function ''callback'' with XXXXX arguments: DOM document object, URL, and XXXX. FIXME the optional ''charset'' argument forces the response to be interpreted in the specified character set. This is approximately the equivalent of ''doGet'', except that it returns DOM document objects instead of strings.
  
-''Zotero.Utilities.processAsync(sets, callbacks, onDone)'' can be used from translators to make it easier to correctly chain sets of asynchronous callbacks, since many translators that require multiple callbacks do it incorrectly [text from commit message, r4262]+**Note:** The response objects passed to the callbacks above are <a href="https://developer.mozilla.org/en/XMLHttpRequest">described in detail in the MDC Documentation</a>
 + 
 +''Zotero.Utilities.processAsync(sets, callbacks, onDone)'' can be used from translators to make it easier to correctly chain sets of asynchronous callbacks, since many translators that require multiple callbacks do it incorrectly [text from commit message, r4262] 
  
 == Synchronous == == Synchronous ==
dev/translator_coding.txt · Last modified: 2017/11/12 19:53 by 127.0.0.1