On Aug 27, 11:45 am, 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);

I breakpoint these lines:
                        function(data){
                                alert(data);
                        });

It stops at function, then I play and it jumps to })
Its never executing the alert.

Reply via email to