you need to include jquery <script type="text/javascript" src="path/to/jquery.js"></script>
sorry about that. I've never used ajaxCFC and I am sure it works well with cf, I used to use xajax for php for ajax communication, and I must say that using jq was so much easier. I actually use the ajax functions alot for pulling in/working with json, php, asp, asp.net, cf, xml and java and I find it very good and flexible. Give it a try, I know your head is probably spinning a little bit, it took me for ever to start getting my head around the jquery concept and I must say, once you got it, everything else is just cake. On 2/22/07, Rick Faircloth <[EMAIL PROTECTED]> wrote:
Hmmm… no "Hello world", but getting an error… "Line 8, Character 1, Object Expected" That's the $(document)… line. Suggestions? Rick *From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *On Behalf Of *Benjamin Sterling *Sent:* Thursday, February 22, 2007 10:42 PM *To:* jQuery Discussion. *Subject:* Re: [jQuery] Best way to do AJAX... CF or jQuery? Rick, Here is a super quick example: create a .cfm page, we'll call it test.cfm, on the page just put "Hello world" and nothing else, no other code. can create another page and we'll call it test.htm, this is going to be a basic html page an put the following in the head section: <script type="text/javascript"> $(document).ready(function(){ $.ajax({ url:'test.cfm', success: function(){$('body').append(agruments[0]);} }); }); </script> save both pages and put on the cf server and then browse to it, when the page loads you should see "Hello world" there. Now, keep in mind this was a super simple example and but is a real world use. Take a look at the $.ajax function in the api ( jquery.com/api), I personally would suggest that you get to know that function before using the other ajax functions (load, get, post, getJson) and get to know the params. Let me know if you need any more direction. -- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
-- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com
_______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
