Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Multiple Instances of a CFFunction/CFComponent

Avatar of mudbuggle
mudbuggleFlag for United States of America asked on
JavaScriptColdFusion LanguageAJAX
6 Comments1 Solution977 ViewsLast Modified:
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>
Avatar of azadisaryev
azadisaryevFlag of Hong Kong image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

This problem has been solved!
Unlock 1 Answer and 6 Comments.
See Answers