Avatar of mudbuggle
Flag for United States of America

asked on 

Multiple Instances of a CFFunction/CFComponent

I am having an issue calling multiple instances of a cffunction. The problem is I intermittenly get null is null errors and some of the data is jumbled. The strange part is the issue is occurring with seperate functions as well.  Any assistance would be greatly appreciated.
I have posted a simplified example of how I am calling the functions below.
I can post the actual code if needed.
<cffunction name="getMenu" returntype="query" access="remote">
<cfaurgument name="menu" required="true">
<cfquery name="getmenu" datasource="someDB">
     SELECT Title, id
     FROM someTable
     WHERE id = #menu#
<cfreturn getmenu>
<script language="javascript" type="text/javascript">
function setMenu(obj)
     var params = new Object();
     params.Item = obj;
function makeMenu(obj)
          var alter = document.getElementById(obj.id[i]);
          alter.innerHTML = ob.title[i];
<body onload="setMenu(1);setMenu(2);setMenu(3);setMenu(4)">
     <div id="1"></div>
     <div id="2"></div>
     <div id="3"></div>
     <div id="4"></div>

Open in new window

AJAXColdFusion LanguageJavaScript

Avatar of undefined
Last Comment

8/22/2022 - Mon