> I'm building some user-configurable front page widgets for a site > that I'm building. I'd prefer to use CFSCRIPT for a number of reasons. > Anyway, I'm having trouble getting any output. This code, using > CFINVOKE, works fine (it returns the HTML for an image tag): > > <cfinvoke component="lib.cfc.html_modules" method="fpRandImage" > returnvariable="img">#img# > > Yet, this code within a CFSCRIPT block, returns > "[EMAIL PROTECTED]": > > fpWidgetObj = createObject("component","lib.cfc.html_modules"); > newrow = queryAddRow(qryFPSidebar, 1); > temp = querySetCell(qryFPSidebar, "order", "3"); > temp = querySetCell(qryFPSidebar, "type", "Image"); > temp = querySetCell(qryFPSidebar, "content", > "#fpWidgetObj.fpRandImage#"); > > I'm returning the data as a query object to make it easier to sort the > data for display on the front page. > > Any ideas what I'm doing wrong?
Method calls in CFSCRIPT need to be written just like they are for built-in functions: fpWidgetObj.fpRandImage() What your code is returning is a pointer to the function, more or less. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:225987 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54