en:code:data:web
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:code:data:web [2011/10/01 22:54] – [toText] jmgr | en:code:data:web [2024/08/11 11:46] (current) – jmgr | ||
|---|---|---|---|
| Line 17: | Line 17: | ||
| * onDownloadProgress - ([[# | * onDownloadProgress - ([[# | ||
| * onError - ([[# | * onError - ([[# | ||
| - | * file - ([[en: | + | * file - ([[en: |
| === Example === | === Example === | ||
| Line 52: | Line 52: | ||
| * method - (Method) the method to use (get or post) | * method - (Method) the method to use (get or post) | ||
| * postData - (object) post data to send | * postData - (object) post data to send | ||
| + | * rawData - (string) raw post data to send [//Since version 3.11.0//] | ||
| * query - (object) query items | * query - (object) query items | ||
| * user - (string) the username to use if asked | * user - (string) the username to use if asked | ||
| Line 64: | Line 65: | ||
| === Notes === | === Notes === | ||
| This method is asynchronous, | This method is asynchronous, | ||
| - | To known when this is done use the [[# | + | To know when this is done use the [[# |
| ==== isDownloading ==== | ==== isDownloading ==== | ||
| Line 135: | Line 136: | ||
| === Returns === | === Returns === | ||
| * (Web) this Web | * (Web) this Web | ||
| + | |||
| + | ===== Events ===== | ||
| + | |||
| + | ==== onFinished ==== | ||
| + | Called when the data has been downloaded. | ||
| + | |||
| + | === Syntax === | ||
| + | <code javascript> | ||
| + | myObject.onFinished = function() {}; | ||
| + | </ | ||
| + | |||
| + | === Example === | ||
| + | <code javascript> | ||
| + | myObject.onFinished = function() | ||
| + | { | ||
| + | //Event action | ||
| + | }; | ||
| + | </ | ||
| + | |||
| + | ==== onDownloadProgress ==== | ||
| + | Called when the download progression has changed. | ||
| + | |||
| + | === Syntax === | ||
| + | <code javascript> | ||
| + | myObject.onDownloadProgress = function(bytesReceived, | ||
| + | </ | ||
| + | |||
| + | === Arguments === | ||
| + | - bytesReceived - (integer) received byte count | ||
| + | - bytesTotal - (integer) total byte count | ||
| + | |||
| + | === Example === | ||
| + | <code javascript> | ||
| + | myObject.onDownloadProgress = function(bytesReceived, | ||
| + | { | ||
| + | //Event action | ||
| + | }; | ||
| + | </ | ||
| + | |||
| + | ==== onError ==== | ||
| + | Called when an error occurs. | ||
| + | |||
| + | === Syntax === | ||
| + | <code javascript> | ||
| + | myObject.onError = function(errorText) {}; | ||
| + | </ | ||
| + | |||
| + | === Arguments === | ||
| + | - errorText - (string) a text describing the error | ||
| + | |||
| + | === Example === | ||
| + | <code javascript> | ||
| + | myObject.onError = function(errorText) | ||
| + | { | ||
| + | //Event action | ||
| + | }; | ||
| + | </ | ||
| + | |||
| + | ===== Enumerations ===== | ||
| + | |||
| + | ==== Method ==== | ||
| + | The download method. | ||
| + | |||
| + | === Values === | ||
| + | - Get: use " | ||
| + | - Post: use " | ||
en/code/data/web.1317509686.txt.gz · Last modified: (external edit)
