!--- get a list of all external customers for AJAX calls ---
cffunction name=AJAXgetAllCustomers access=remote output=false
returnformat=json
!--- create a struct to hold our local variables. ---
cfset var loc = structNew()
!--- returns a query. ---
cfset loc.custList = getAllCustomers() /
)#/cfoutput/cfsavecontent
-- Josh
-Original Message-
From: Eric Cobb [mailto:cft...@ecartech.com]
Sent: Wednesday, June 09, 2010 2:35 PM
To: cf-talk
Subject: Problems with slashes in JSON
I can't figure this thing out for the life of me, and I know it's got to
be something simple
One question I do have though, why not just return the query as an object
and use javascript to build li list items? This would be less load on the
server, less data to transmit over the interwebs and ultimately faster.
On Thu, Jun 10, 2010 at 9:26 AM, Michael Grant mgr...@modus.bz wrote:
If Eric is returning a plain string, then there is no need to
SerializeJson() the result, as all he needs is the string. That is why
Eric is getting the additional slashes in his closing tag, because the
SerializeJson() method is automatically escaping the slash characters.
I'll agree with
If Eric is returning a plain string, then there is no need
to SerializeJson() the result
Too right. That was an artifact from using Eric's example.
~|
Order the Adobe Coldfusion Anthology now!
I originally thought about just parsing the return in jQuery, until I
realized what this code was ultimately going to have to do. The items
in this list are actually going to wind up having text hyperlinks, form
buttons, and maybe even images added to them, so for me it's easier to
build it
It's about being ajaxy in the right places.
You can be ajaxy without using jQuery as well. If you only want jQuery to do
the ajax calls and all you want to do is dump html (into a div or other dom
object) that's been compiled on the server just write your own to get the
http object?
On Thu,
I can't figure this thing out for the life of me, and I know it's got to
be something simple that I'm missing.
Here's what I'm trying to do. I'm using jQuery to hit a CFC and return
data. The CFC actually queries the database, loops through results and
creates list items for each row. I
(loc.custList.full_name)# -
#Trim(loc.custList.addr_line1)#, #Trim(loc.custList.city)#,
#Trim(loc.custList.state)#/cfoutput/cfsavecontent
-- Josh
-Original Message-
From: Eric Cobb [mailto:cft...@ecartech.com]
Sent: Wednesday, June 09, 2010 2:35 PM
To: cf-talk
Subject: Problems with slashes in JSON
I can't
: Eric Cobb [mailto:cft...@ecartech.com]
Sent: Wednesday, June 09, 2010 2:35 PM
To: cf-talk
Subject: Problems with slashes in JSON
I can't figure this thing out for the life of me, and I know it's got to
be something simple that I'm missing.
Here's what I'm trying to do. I'm using jQuery to hit
10 matches
Mail list logo