If you check the documentation you'll see that "this" in the "success" function will be "the options for this ajax request".
http://docs.jquery.com/Ajax/jQuery.ajax#options Karl Rudd On Wed, Jan 14, 2009 at 2:31 PM, Rick Faircloth <r...@whitestonemedia.com> wrote: > > Would it still be referring to the '.update-button that was clicked in the > second line? > > Thanks, > > Rick > > > $(document).ready(function() { > > $('.update-button').click(function(){ > > var formval = { tour_url: > $(this).parent().parent().find('.update-input').attr('value'), > mls_number: > $(this).parent().parent().parent().attr('id'), > dsn: '<cfoutput>#application.dsn#</cfoutput>', > agent_id: > '<cfoutput>#session.agent_id#</cfoutput>' }; > > $.ajax({ cache: false, > type: "POST", > url: > "../components/virtual_tours.cfc?method=update_tour_url&returnFormat=json", > dataType: "json", > data: formval, > success: function(response) { > > if (response.update == "Update > Successful") > { $(this).attr('id'); > $(this).attr('id'); } > else > { > $(this).parent().next('.tour-url').empty().append('Update > Unsuccessful').fadeIn(500); } > > } > > > }); > }); > > }); > >