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/

Reply via email to