Have you also tried accessing your PHP page directly and copying it's
output into http://www.jsonlint.com?

I'd also double check your server has the JSON module for PHP
installed, just to be sure ;-)



On Aug 27, 4:45 pm, MorningZ <morni...@gmail.com> wrote:
> I would suggest using Firefox and FireBug to "watch" what comes back
> from your $.getJSON call... because that will indicate that your JSON
> is indeed valid, because if it isn't, you'll never make it into the
> success event
>
> On Aug 27, 11:01 am, sso <strongsilent...@gmail.com> wrote:
>
> > I need to return several values and I'd rather do it all in one ajax
> > call.  However there doesn't seem to be anything in data.  Perhaps I'm
> > way off here.
>
> > I appreciate any guidance you can give me.  Thanks :)
>
> > This is my jquery
> >         $('#cart-pulldown').livequery('click', function(event){
> >                 $.getJSON(siteurl + "home/aj/showCart/", {},
> >                         function(data){
> >                                 alert(data);
> >                         });
> >         });
>
> > This is the ajax in my PHP
> >                                 $tmp = "";
> >                                 foreach($_SESSION['cart'] as $key =>$line){
> >                                         $tmp .= $key . " ..... " . $line . 
> > "<br />\n";
> >                                 }
> >                                 $tmp .= '<div><span id="clearList">Clear 
> > List</span></div>';
> >                                 echo json_encode($tmp);

Reply via email to