Hi,

I'm trying to use the $.getJSON() but with no luck. Here's the code
I'm using to make the call.

$.getJSON(http://the.domain.com/getJSON.php?
experiment=104&callback=handleIt104.callback&format=jsonp&askingfor=recipetransaction');

This calls a php script which as an example would return the
following:

handleIt104.callback({"status": "success", "recipe": "Ne",
"transaction": "11451988", "recipemask": "", "askingfor":
"recipetransaction", "experiment": "104"});

The handleIt104.callback method/function exists and this works fine
when I make a call like this:

<script src="http://the.domain.com/getJSON.php?
experiment=104&callback=handleIt104.callback&format=jsonp&askingfor=recipetransaction"></
script>

But I'm new to jQuery and I'm guessing that the way I'm currently
doing things with the <script> tag is not correct.

Can someone please let me know what I'm doing wrong and what I can
expect back from the $.getJSON call? Is it only supposed to return a
JSON block without the callback in front of it such as the following?

{"status": "success", "recipe": "Ne", "transaction": "11451988",
"recipemask": "", "askingfor": "recipetransaction", "experiment":
"104"}

Any help would be greatly appreciated.

Thanks so much. Looking forward to learning all I can about jQuery and
making use of it with my JavaScript programming.

Reply via email to