• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Progress Bar doesnt show

Participant ,
Aug 06, 2009 Aug 06, 2009

Copy link to clipboard

Copied

why doesnt progress bar show on ie/ns?....Thank you all.

<cfif isdefined('form.Process') and form.process eq "Process" and isdefined('Form.rosterfile') and form.rosterfile neq "">
<cfset CurrDir = GetDirectoryFromPath(GetTemplatePath())>
  <cfset StorageDir = GetDirectoryFromPath(GetTemplatePath()) & "Storage\">
      <div id="display_while_running">
         <table align="center" border="0" cellpadding="0" cellspacing="0" style="border:solid 1px green; background : #backgroundcolor1#; width:600px;padding:5px; text-align:center;">
          <tr>
            <td >
              <b>Please wait while it is processing...</b>
            </td>
          </tr>
          <tr>
            <td>
             <img src="../imgs/progressbar2.gif" width="250" height="20">
            </td>
          </tr>
        </table>
      </div>
        
    <!---CFOUTPUT>#RepeatString(" ",300)#</CFOUTPUT--->
     
      <!---cfflush--->
       
      <cffile action="upload"
      destination="#StorageDir#"
      nameConflict="overwrite"
      fileField="Form.rosterfile">
      <cfset strFilePath ="#StorageDir##cffile.serverFile#">
      <cfset strFile ="#cffile.serverFile#">
     
      <cfquery datasource="#application.Orc#" name="GetFileName">  
        Select FILE_NAME from ops$rms.HR_File
        where
        lower(file_name) = lower('#strFile#')
     </cfquery>
            
    <cfif GetFileName.recordcount neq 0>
      <cfset msg = "This file has been already uploaded. Please upload a different one.">
    <cfelse>
        <cfflush interval="10">
    

        <cfset CurrFilePath ="#CurrDir##cffile.serverFile#">
       
        <cffile action = "copy" source="#strFilePath#" destination="#CurrDir#">
        <cffile action="rename" source="#CurrFilePath#" destination="#CurrDir#HrXls.xls">
                  
        <cflock name="xlsloader" timeout="300" type="exclusive">

              <cfset command = "java RMSHRFileReader C:\Inetpub\wwwroot\RMS\hr_loader\HrXls.xls">
              <cfset syscmd = createObject("java","au.com.webcode.util.SystemCommand").init()>
              <cfset result = syscmd.execute(command,"300000")> <!---5 mins, must be a string--->
              <cfif result.getExitValue() neq 0>
               <cfset msg = "The uploading process has been partially completed.">
       </cfif>
        </cflock>
       
        <cfquery datasource="#application.Orc#" name="InsFileName">
          insert into ops$rms.HR_File(file_name, updated_on, updated_by)
          values('#strFile#',SYSDATE,'#session.username#')
        </cfquery>
       
        <cfset stdout = 1> 
        <cffile action = "delete" file="#CurrDir#HrXls.xls">
    </cfif>
    
  <script language="Javascript">
      document.getElementById('display_while_running').style.display='none';
    </script>
          

</cfif>

TOPICS
Advanced techniques

Views

1.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Aug 10, 2009 Aug 10, 2009

Copy link to clipboard

Copied

Because ColdFusion code starts executing after the contents of the

file to be uploaded is received by the server. In other words when

you're trying to show the progress bar there's no need for a progress

bar because the upload is at 100%.

Mack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 10, 2009 Aug 10, 2009

Copy link to clipboard

Copied

Even when i place withing else statement which invokes a java excel reader doesnt show.... what is the solution? Thank you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Aug 10, 2009 Aug 10, 2009

Copy link to clipboard

Copied

LATEST

The progress bar problem doesn't have an easy solution in CF. You can

use a flash uploaded that gives you a progress bar (swfupload.org

comes to mind).

Mack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation