<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Hang in there, Charlie!<o:p></o:p></span>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>My head was very bloody from banging it against the wall when I
first started<o:p></o:p></span>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>down the AJAX road. Now I’m finally getting some work done with
it! I almost<o:p></o:p></span>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>gave up several times.<o:p></o:p></span>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>fwiw, I have always used the $.ajax method without any problems
and typically specify<o:p></o:p></span>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>the method as “post”, occasionally venturing to use “get” when
just retrieving data,<o:p></o:p></span>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>just to see what might happen…nothing different.<o:p></o:p></span>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>(and actually, I recognized that censored expression, having
been there! :o)<o:p></o:p></span>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Rick<o:p></o:p></span>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
jquery-en@googlegroups.com [mailto:jquery-en@googlegroups.com] <b>On Behalf Of </b>Charlie
Griefer
<b>Sent:</b> Friday, September 25, 2009 2:06 PM
<b>To:</b> jQuery (English)
<b>Subject:</b> [jQuery] getJSON callback not firing?<o:p></o:p></span>
</div>
<p class=MsoNormal><o:p> </o:p>
<p class=MsoNormal>Hey all:
I've read the docs and googled the heck out of this, but not seeing what the
problem is.
I'm trying to get some data from the server via the getJSON() method. I
do see a response in firebug and I've validated the response data at
JSONLint.com. However, the callback function simply will not fire.
I've tried to simplify things as much as possible. The CFC returning the
data is in the same directory as the calling page. The callback function,
for now, should only alert a simple text string (which has evolved from
"hi" to "foo" to a censored version below as the hours have
passed).
$(document).ready(function() {
$('a.players').click(function() {
$.getJSON(
'data.cfc?method=getPlayerByID&returnformat=JSON&queryformat=column&playerID='
+ <a href="http://this.id">this.id</a>,
function(data) {
alert('i %!%##%* hate you');
});
return false;
});
});
Here's the response I receive:
{"ROWCOUNT":1,"COLUMNS":["PLAYERID","PLAYERNAME","PLAYERNUMBER","PLAYERPOSITION","PLAYERIMG","PLAYERCOLLEGE"],"DATA":{"PlayerID":[1],"PlayerName":["Barden,
Ramses"],"PlayerNumber":[13],"PlayerPosition":["WR"],"PlayerImg":["http:\/\/<a
href="http://assets.giants.com">assets.giants.com</a>\/uploads\/players\/2FE2D3BDF4FB443D949D1D39B69ADC03.gif"],"PlayerCollege":["Cal
Poly"]}}
...which when pasted into JSONLint returns valid.
If anyone has any ideas, or if there's any additional information that I can
provide, I'm all ears.
Thanks!
Charlie<br clear=all>
--
Charlie Griefer
<a href="http://charlie.griefer.com/">
http://charlie.griefer.com/</a>I have failed as much as I have succeeded. But I love my life. I love my wife.
And I wish you my kind of success.<o:p></o:p>
</div>
</body>
</html>