Click to See Complete Forum and Search --> : Replacing <span><tr>..</tr></span> ???


VanJeje
05-07-2004, 04:06 PM
Hi all,

I am happy there is such a forum. I hope I will be able to find interesting things as well as exchanging some knowledge.

I am currently trying to have a part of an XML+XSLT=HTML page replaced on the client (Internet Explorer 6) with a new XML transformed section. There is no problem for replacing <span id="myid"><table>...</table></span> through JavaScript document.all.myid.outerHTML = ...new section with same structure built from another XML document, with the same XSLT stylesheet (transformNode(document.XSLDocumment))... But it appears that with IE6 it is not possible to do the same for <span id="myid"><tr>...</tr></table> because outerHTML property is read-only for a "tr" object.
(I will soon show an example)

So, I am looking for some advice for replacing an entire line with a new one.
I have tried to transformNodeToObject in order to copy each td content, but the resulting object does not contain anything (perhaps because it is only part of an HTML regular file) !

Thank you in advance

Khalid Ali
05-08-2004, 12:32 AM
how about using innerHTML?

VanJeje
05-08-2004, 07:55 PM
Sorry, I forgot to mention innerHTML is read-only for table and tr.

It seems it is possible to replace only a complete table (including the <table> tag), or the content of a td (cell), but nothing between.

I am currently trying to get transformNodeToObject to work ; an emergency solution would be replacing td contents with those of the resulting document.