[jQuery] Re: AJAX Success Callback referring to $(this)

2008-10-08 Thread Josh Nathanson
D]> To: "jQuery (English)" Sent: Wednesday, October 08, 2008 2:18 PM Subject: [jQuery] Re: AJAX Success Callback referring to $(this) Right, but that trigger doesn't work in the context of the anonymous function. Unless, I'm missing something you changed. -Wayne On Oc

[jQuery] Re: AJAX Success Callback referring to $(this)

2008-10-08 Thread MorningZ
  }); > > > }); > > > -- Josh > > > - Original Message - > > From: "Wayne" <[EMAIL PROTECTED]> > > To: "jQuery (English)" > > Sent: Wednesday, October 08, 2008 12:15 PM > > Subject: [jQuery] Re: AJAX Success Call

[jQuery] Re: AJAX Success Callback referring to $(this)

2008-10-08 Thread Wayne
7;trigger' >         } >     }); > > }); > > -- Josh > > - Original Message - > From: "Wayne" <[EMAIL PROTECTED]> > To: "jQuery (English)" > Sent: Wednesday, October 08, 2008 12:15 PM > Subject: [jQuery] Re: AJAX Success Call

[jQuery] Re: AJAX Success Callback referring to $(this)

2008-10-08 Thread Josh Nathanson
do whatever with 'trigger' } }); }); -- Josh - Original Message - From: "Wayne" <[EMAIL PROTECTED]> To: "jQuery (English)" Sent: Wednesday, October 08, 2008 12:15 PM Subject: [jQuery] Re: AJAX Success Callback referring to $(this) OK.

[jQuery] Re: AJAX Success Callback referring to $(this)

2008-10-08 Thread Wayne
OK. I haven't tried this yet, but how is this any different? Even though you're moving the ajax call inside of another function, aren't you abstracting the same logic out by calling the anonymous function inside of success? Maybe I'm not understanding what "trigger" and "trigger condition" are sup

[jQuery] Re: AJAX Success Callback referring to $(this)

2008-10-08 Thread Josh Nathanson
"this" referenced in the success callback will refer to the jQuery object when you do an ajax call. You might want to put the ajax call within another function that can also receive information about the triggering element: doAjax: function( trigger ) { jQuery.ajax({ // et

[jQuery] Re: AJAX Success Callback referring to $(this)

2008-10-08 Thread Wayne
Here's a context of when it would be useful: jQuery.ajax({ data: inputs.join('&'), url: "delete_bline.php", timeout: 5000, error: function() { alert("Sorry, deleting the baseline could not be completed at this time. Please try again, later.");

[jQuery] Re: AJAX Success Callback referring to $(this)

2008-10-08 Thread MorningZ
How about posting what you have? that would give a good basis to start to explain it To hope to help though, since the Ajax request is made asynchronously, it loses the context of "this" On Oct 8, 10:49 am, Wayne <[EMAIL PROTECTED]> wrote: > I've been looking for this quite a bit, today, and