I had to do something similar, and this is how I solved it.

$.ajax({url:'blabla',success:process});

function process(results)
{
        var id = 'therowid';
        var origRow = $('#'+id);
        var newRow = $(results).insertAfter(origRow);
        origRow.remove();
        newRow.attr('id',id);
}

So long as "results" was a string of properly formed TR html, this would
insert a new row after the current one, then remove the current one.

Of course, this would only work if you don't have a bunch events wired up
the row or its children.

JK

-----Original Message-----
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of pihentagy
Sent: Monday, March 03, 2008 1:41 PM
To: jQuery (English)
Subject: [jQuery] assign to outerhtml


Hi all!

I'd like to update a tr tag of a table with an ajax call.
The problem is that outerhtml is an IE specific attribute, and I have
the row style defined in the tr tag.
Is there a cross-browser solution to update a single row of a table
either with some cross-browser outerhtml script or without using
outerhtml?
So here just getting the outerhtml is not enough, I'd like to use it
as an lvalue.

Since I'm a beginner in jquery, can I have a minimal but complete
example? (I have some difficulties with the ajax functions)

thanks
Gergo

Reply via email to