Javascript - cacheProgress
Description
Fires while the files stored in the Application Cache are being downloaded. Allows you to display a progress message to the user.
Discussion
Fires each time a file in the cache is downloaded. Use this event to display progress. Your code can reference the following variables:
- e.event.loaded
The number of files that have been loaded.
- e.event.total
The total number of files in the cache.
This event is not supported on Firefox. Firefox does not return the e.event.loaded or e.event.total variable.
Example
var ele = $('APPCACHE_DOWNLOAD_PROGRESS'); ele.style.display = ''; if(typeof e.event.total != 'undefined') { ele.innerHTML = 'Loaded ' + e.event.loaded + ' of ' + e.event.total; if(e.event.loaded == e.event.total) { ele.style.display = 'none'; } } else { ele.innerHTML = 'Working....'; }
To use this example in your own UX Component, you must add a div with the ID APPCACHE_DOWNLOAD_PROGRESS to the component. This can be done using the Static Text control. The Static Text control can be found in the Other Controls section.