Perfect!

On Apr 15, 1:57 pm, Eric Garside <gars...@gmail.com> wrote:
> $.ajax({
>         type: "GET",
>         dataType: "json",
>         url: tUrl,
>         success: function(data){ GotNewData(data, 'custom string'); },
>         error: GetDataError,
>         complete: AjaxRequestComplete
>     });
>
> On Apr 15, 4:53 pm, Nic Hubbard <nnhubb...@gmail.com> wrote:
>
> > I am interested in this as well.  How could I send a string to the
> > success GotNewData function?
>
> > On Feb 26, 9:50 am, P Burrows <pburr...@gmail.com> wrote:
>
> > > Is anyone aware of a way to pass some additional context information to 
> > > the
> > > "success" function of an ajax request?
> > > For instance, here is my code which works fine:
>
> > > $.ajax({
> > >         type: "GET",
> > >         dataType: "json",
> > >         url: tUrl,
> > >         success: GotNewData,
> > >         error: GetDataError,
> > >         complete: AjaxRequestComplete
> > >     });
>
> > > To the "GotNewData" function, I would also like to pass some other
> > > information. The url would be nice, but some other context info would be
> > > fine too. A unique ID. Some random string. ...anything.
>
> > > Any ideas?
>
> > > --
> > > Patrick Burrowshttp://www.CleverHumans.com

Reply via email to