View Single Post
  #2  
Old 10-10-2011, 05:34 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Yes, it is. An example from SQL Explorer (all clientside):

PHP Code:
function startFileDownloads() {
  
temp.filesToDownload = {
    {
"sqlexplorer_database-big.png""http://wiki.graal.net/images/3/33/DatabaseSmall.png"},
    {
"sqlexplorer_database-small.png""http://wiki.graal.net/images/d/d2/DatabaseIcon.png"},
    {
"sqlexplorer_loading.gif""http://wiki.graal.net/images/a/a7/GuiBlueLoading.gif"}
  };
 
  for (
temp.fileToDownload temp.filesToDownload) {
    if (
getimgwidth(temp.fileToDownload[0]) <= 0) {
      
// download it
      
this.downloadFile(temp.fileToDownload);
    }
  }
}
 
function 
downloadFile(temp.fileToDownload) {
  
temp.req requestURL(temp.fileToDownload[1]);
  
temp.req.fileName temp.fileToDownload[0];
  
this.catchEvent(temp.req"onReceiveData""onDownloadCompleted");
}
 
function 
onDownloadCompleted(temp.req) {
  
temp.prefix "";
 
  if (
getServerName().starts("Login")) {
    
temp.prefix "scriptfiles/" escapeFileName(getServerName()) @ "/";
  }
 
  
temp.req.fullData.saveString(temp.prefix temp.req.fileNamefalse);

__________________
Reply With Quote