Josh,   thanks for the tip.   console.log(code) outputs "undefined."
Any other suggestions?

Thanks again,

Stan



On May 5, 7:42 pm, "Josh Nathanson" <[EMAIL PROTECTED]> wrote:
> Stan,
>
> I'd suggest using Firefox with the Firebug extension, and doing a
> console.log(code) in your callback.  This will give you better information
> than is provided by using the alert method.
>
> -- Josh
>
>
>
> ----- Original Message -----
> From: "Stan McFarland" <[EMAIL PROTECTED]>
> To: "jQuery (English)" <jquery-en@googlegroups.com>
> Sent: Monday, May 05, 2008 2:07 PM
> Subject: [jQuery] newbie struggling with JSON
>
> > Hi,  newbie here.   Hoping someone can help.  I'm able to successfully
> > call $.get and then eval() a URL that returns a JSON object:
>
> > $.get("myurl",
> >    function(code)  {  eval(code);  alert(code[0]); });
>
> > But if I try to call $.getJSON on the same URL:
>
> > $.getJSON ("myurl",
> >   function(code) { alert(code[0]); });
>
> > I always get back:    "code" has no properties
>
> > Any suggestions?
>
> > Thanks,
>
> > Stan McFarland
> > `- Hide quoted text -
>
> - Show quoted text -

Reply via email to