Thanks dean, that's great

-----Original Message-----
From: Dean Lawrence [mailto:dean...@gmail.com] 
Sent: 14 March 2011 13:21
To: cf-talk
Subject: Re: RE: Database Lookup - Possible with CF?


Ian, again you are mixing things up.CFJSON is not what calls the
webservice. CFJSON is used to encode or decode native ColdFusion
objects to and from JSON format. So if you if have a query result, you
would pass that query object to CFJSON and it will encode it into JSON
format. Vice-versa, you can pass it a JSON string and it can covert it
back to a native ColdFusion object.

So with that said, JQuery would make an AJAX call to your ColdFusion
page, be it a .cfm or .cfc page (doesn't really matter as JQuery
doesn't care). On that ColdFusion page you would invoke the webservice
that you are getting your data from and make whatever calls that the
webservice requires. If what you get back from the webservice is not
in a JSON format, you would then pass the results to CFJSON to convert
it to JSON. It is this converted data that you would then return to
the original AJAX call and now use JQuery to populate your form with
that data.

I think your hang-up is on this whole ColdFusion 7 mentality. The use
of JQuery to make an AJAX call and populate the form is not ColdFusion
7 specific, as it is a client-side task, it really has nothing to do
with ColdFusion 7. The only ColdFusion 7 functionality that you really
need to be concerned about is making the call to your .Net webservice.
Here is Adobe's LiveDoc page that tells you how to do that.

http://livedocs.adobe.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/ht
ml/wwhelp.htm?context=ColdFusion_Documentation&file=part_dev.htm

As for ColdFusion 7 and JSON, JSON is really only text. Again, you
don't need anything special to work with it. Projects like CFJSON
simply make it easier to work with it. But if you look at the source
code for CFJSON, it is just using plain old ColdFusion to process the
data. The same holds true for newer version of ColdFusion. The
built-in tags are just a way to make it easier to work with JSON, but
are not required. I'm running ColdFusion 9.01 and don't use any of the
built-in tags to do my AJAX calls as I like to have full control over
the process. That's just me though.

Anyway, here is a link to the JSON homepage so that you can get a
better understanding about what it is.

http://www.json.org/

Dean

On Mon, Mar 14, 2011 at 7:24 AM, Ian Vaughan
<i.vaug...@neath-porttalbot.gov.uk> wrote:
>
> Thanks found this link
>
http://www.monochrome.co.uk/blog/2008/02/01/using-jquery-and-coldfusion-
> 7-with-a-little-json-glue which seems ok - the problem I am having in
> understanding is how would I use CFJSON to use the .asmx webservice
data
> that I would consume/call with the Coldfusion 7 cfinvoke tag?
>

-- 
------------------------------------------------------------------------
---
Dean M. Lawrence
INTERNET DATA TECHNOLOGY
p // 888.438.4381 ext. 701
w // www.idatatech.com
f // www.facebook.com/idatatech
t // www.twitter.com/idatatech

Social Marketing | SEO | Design | Internet Development



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:342992
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to