I am running a function that takes a long time to run in coldfusion.
I would like to display a Loading Data message when the data needs to
be loaded then hide that message once the data load is complete.  What
jQuery functions do you recommend and what basic approach do I need to
take.

This is what I have (non qQuery approach), but the cfflush seems to
have issues on the production server.


<!--- Load all offices to create a TopOffice org tree. --->
<cfset application.EmployeeDB_Functions.Loading_Data_Message_On
('Load_Office','Loading Office Data .........')>
<cfset application.TopOffice = createobject('component','EIMC/
EmployeeDB/cfc/Office').init(#p_OfficeID#)>
<cfset application.EmployeeDB_Functions.Loading_Data_Message_Off
('Load_Office')>


<!--- Turn ON Loading Data Message --->
<cffunction name="Loading_Data_Message_On" access="public"
output="yes">
  <cfargument name="FormName" required="yes">
  <cfargument name="Message" required="yes">
  <form name="#FormName#" style="margin:10px;width:600px">
    <input name="inMessage" value="#Message#" style="font-size:
18px;width:600px">
  </form>
 <cfflush>
</cffunction>


<!--- Turn OFF Loading Data Message --->
<cffunction name="Loading_Data_Message_Off" access="public"
output="yes">
  <cfargument name="FormName" required="yes">
  <script>
    document.#FormName#.style.height="0px";
    document.#FormName#.style.margin = "0px";
    document.#FormName#.style.visibility="hidden";
    document.#FormName#.style.margin="0px";

    document.#FormName#.inMessage.value = "Load Complete";
    document.#FormName#.inMessage.style.height="0px";
    document.#FormName#.inMessage.style.margin="0px";
    document.#FormName#.inMessage.style.padding="0px";
    document.#FormName#.inMessage.style.visibility="hidden";
  </script>
  <cfflush>
</cffunction>

Reply via email to