with $.ajax, you use the success callback.

                        $.ajax({
                           type: 'GET',
                           url:  'index.php',
                           data: 'id=' + productId + '&qtd=' +
quantidade,
                           success: function(data) {
                                alert(data);
                           },
                           error: function() {
                                alert('error occurred');
                           }
                         });

On Jul 7, 11:49 am, BaBna <thomas.na...@gmail.com> wrote:
> You need to define your callback function. Maybe something like this?
>
> $.get("index.php", { id: productId , qtd: quantidade }, function(data)
> {
>   doWhateverWith(data);
>
> });
>
> On Jul 7, 10:42 pm, Glazz <brunofgas...@live.com.pt> wrote:
>
> > Hello,
>
> > I have a function that have this:
>
> >                         $.ajax({
> >                            type: 'GET',
> >                            url:  'index.php',
> >                            data: 'id=' + productId + '&qtd=' + quantidade
> >                          });
>
> > This piece of code is working great, but i need to know how to get the
> > response from the specified url, for example, the response from
> > index.php is two, i need to get that to place it inside a div, i know
> > with load i can do that, but i want to be able to send in the response
> > an array with some data.
>
> > Hope you understand :[
>
> > Regards!
>
>

Reply via email to