I'm playing around with the cfajaxproxy example on adobe livedocs and
everything looks right, I get
"Timestamp: 9/12/2012 10:15:55 AM
Error: TypeError: presentation is null
Source File: http://localhost:81/resources/demo.cfm?reset=1
Line: 44"

here's the code I have..

<cfajaxproxy cfc="proxy" jsclassname="pres">

// Use an asynchronous call to get the presentations details.
var confPresentations = function(tag_id, year){
      var p = new pres();
      p.setCallbackHandler(populateConferencePresentations);
      p.setErrorHandler(myErrorHandler);
// Pass the tag and year to CFC getAllConferencePresentations function.
      p.getAllConferencePresentations(tag_id, year);
}
// Callback function to display the results of the
getAllConferencePresentations
// function.
var populateConferencePresentations = function(presentation)
{
      var pId = presentation.DATA[0][0];
   ...

}

<body>
   <form name="simpleAJAX" method="post">

      <button name="getConferencePresentations"
onClick="confPresentations(0, 2012)">Verify</button> <!--- set values for
testing --->
      <br><br>
      <input type="text" name="year" id="year" value="2012" /><br />
      <input type="text" name="tag_id" id="tag_id" value="0" /><br />
      <br><br>
      <span id="output"></span>
   </form>
</body>


And the proxy.cfc looks like:
<cfcomponent>

      <cfset this.dsn = "mydsn">
      <cffunction name="getAllConferencePresentations" access="remote"
output="false" returntype="json">
            <cfargument name="tag_id" type="numeric" required="false" />
            <cfargument name="year" type="numeric" required="false" />
            <cfset var qList = "" />
            <cfquery name="qList" datasource="#this.dsn#">
            select stuff from tables
            <cfreturn qList />
      </cffunction>

</cfcomponent>


The query works fine on the other page so I know the problem is not with
that.

Any ideas I can try? Thanks!


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352518
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to