House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

Instantiated CFC behaving incorrectly in IE7 & Safari, but works in Firefox

  << Previous Post |  RSS |  Subscribe to this Group Next >> 

Instantiated CFC behaving incorrectly in IE7 & Safari, but works in Firefox

I've got a simple component that I'm instantiating to maintain a persistent Russ Shakespear 07/21/2008 11:53 AM

07/21/2008 11:53 AM
Author: Russ Shakespear Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:57067#309341 I've got a simple component that I'm instantiating to maintain a persistent variable. Basically, the CFC checks for new entries in a table, and if there are any, sets this variable to be the last entry's id. The next time the CFC is called, it will check for new entries using this variable as the starting point.This works perfectly in Firefox, but not IE or Safari. It appears as though the variable is never set/stored, and remains at 0. I'm not sure what I'm missing, but I can't find any documentation about why a CFC might behave differently in different browsers. What am I missing??? I am instantiating the CFC into a session, using an init() method like so: <cfset session.customerChat = createObject("component","msg").init(chatSession.session)> My CFC consists of two mehtods only:   <cffunction name="init" access="public" output="no" returntype="msg">       <cfargument name="sid" type="numeric" required="yes">              <cfset Variables.ssid = arguments.sid>     <cfset Variables.lastid = 0>         <cfreturn this>     </cffunction>          <cffunction name="getAllMessages" returntype="query" hint="gets all messages in chat session">                  <cfquery name="rsGetAllMsg" datasource="#variables.dsn#">             SELECT cm.s_id,m_id,message,mtime,cm.o_id,cm.c_id,o_name,c_name,c_question             FROM chat_messages cm             LEFT OUTER JOIN chat_operators co             ON co.o_id = cm.o_id             LEFT OUTER JOIN chat_customers cc             ON cc.c_id = cm.c_id             WHERE cm.s_id = #Variables.ssid#               AND m_id > #Variables.lastid#         </cfquery>                  <cfif rsGetAllMsg.recordcount neq 0>             <cfquery name="getlastid" dbtype="query">                 SELECT max(m_id) as maxid                 FROM rsGetAllMsg             </cfquery>             <cfset Variables.lastid = getlastid.maxid>         </cfif>                  <cfreturn rsGetAllMsg>      </cffunction> I would appreciate any help. Thanks,
<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 21, 2013

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Designer, Developer and mobile workflow conference