That was it, Daemach! Oh brother, something so simple. I just couldn't see it! Good catch, Daemach!
I went to bed last night disappointed that even my simplest try at ajax didn't work! Good way to start the day, however! Rick -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Daemach Sent: Friday, February 23, 2007 1:19 AM To: [email protected] Subject: Re: [jQuery] Best way to do AJAX... CF or jQuery? You have corrected agruments[0] to read arguments[0] right? Rick Faircloth wrote: > > Duh. should have realized that. > > No errors now, but still no "Hello World".. > > ??? > > Rick > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > Behalf Of Benjamin Sterling > Sent: Thursday, February 22, 2007 11:22 PM > To: jQuery Discussion. > Subject: Re: [jQuery] Best way to do AJAX... CF or jQuery? > > 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 <http://www.KenzoHosting.com> > > _______________________________________________ > jQuery mailing list > [email protected] > http://jquery.com/discuss/ > > -- View this message in context: http://www.nabble.com/Best-way-to-do-AJAX...-CF-or-jQuery--tf3276462.html#a9 114053 Sent from the JQuery mailing list archive at Nabble.com. _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/ _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
