Hi, Assuming the link is directly within the td (ie.: the td tag is the a tag's parent), you can do this: $(this).parent().htm(results);
Cheers, Diego A. NB.: That is, obviously, instead of "$(this).replaceWith(results);" 2008/7/14 s.ross <[EMAIL PROTECTED]>: > > Hello-- > > I have what seems a simple problem, but it's somehow not working out. > Here's the problem: > > $(".pastebinLink a").livequery(function(){ > $(this).bind('click', function(el){ > $.ajax({ > url: this.href, > type: 'post', > success: function(results, status) { > $(this).replaceWith(results); > } > }); > return false; > }); > }); > > The (X)HTML looks like this: > > <td class="pastebinLink" > > <a class="modal" href="/pastebin_items/14266/edit"> > <img class="viewButton" src="/images/spacer.gif?1210022683" > alt="Spacer"/> > </a> > </td> > > And the stuff returned from the Ajax post looks like: > > <a href="/pastebin_items/14275/edit" class="modal"><img alt="Spacer" > class="viewButton" src="/images/spacer.gif?1210022683" /></a> > > What I expect is that on success everything inside the <td> should be > replaced with the new stuff from the server. What am I missing? > > Thanks (he says missing something obvious :) > -- Cheers, Diego A.