coldfusion-7

How to use jsonutil with coldfusion7 and jquery ajax?

这一生的挚爱 提交于 2019-11-30 09:47:06
问题 I'm trying to understand how to use JSONutil to serialize/deserialize JSON between jquery and coldfusion. I am stuck with coldfusion 7 so I can't use the returnformat='json' attribute in my cfc. client.cfc: <cfcomponent> <cffunction name="GetClientsByName" returntype="query" hint="get clients from search term"> <cfargument name="name" type="string" required="yes"> <cfquery name="GetClientsByName" datasource="#application.dsn#"> SELECT client_id, client_name FROM Clients WHERE client_name LIKE

How to use jsonutil with coldfusion7 and jquery ajax?

﹥>﹥吖頭↗ 提交于 2019-11-29 17:12:39
I'm trying to understand how to use JSONutil to serialize/deserialize JSON between jquery and coldfusion. I am stuck with coldfusion 7 so I can't use the returnformat='json' attribute in my cfc. client.cfc: <cfcomponent> <cffunction name="GetClientsByName" returntype="query" hint="get clients from search term"> <cfargument name="name" type="string" required="yes"> <cfquery name="GetClientsByName" datasource="#application.dsn#"> SELECT client_id, client_name FROM Clients WHERE client_name LIKE '%' + <cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.name#"> + '%' </cfquery> <cfreturn