M
mikejr83
I've been working on a project converting some IE code to be
cross-browser complient. I've run into a little problem figuring out
how to migrate the IE specific mergeAttributes function to something
similar that is complient in NS/Mozilla/Firefox browsers.
Currently I have this basic code
row = this.insertRow(position) //I'm inserting a row into "this" table
row.mergeAttributes(this.templateRow); //here I'm basically "copying"
this template row to the newly created row
// clone all the cells from the template to the new row.
var cells = this.templateRow.childNodes;
for (var i = 0; i < cells.length; i++)
{
var cell = cells.cloneNode(true);
row.appendChild(cell);
}
Basically, I need to come up with a way to copy the attributes from the
the template row to the new row along with all the cells.
I've tried using the cloneNode method on the template row and assigning
the returned element to the row object that was created. This does not
work. Inside these row objects properties have been added, and if I'm
reading this code correctly, it appears that some TR level functions
have been added as well.
Thanks in advance. This has been wreaking some havoc on me for a while
and I don't currently see a solution to it. Thanks!
Mike G.
cross-browser complient. I've run into a little problem figuring out
how to migrate the IE specific mergeAttributes function to something
similar that is complient in NS/Mozilla/Firefox browsers.
Currently I have this basic code
row = this.insertRow(position) //I'm inserting a row into "this" table
row.mergeAttributes(this.templateRow); //here I'm basically "copying"
this template row to the newly created row
// clone all the cells from the template to the new row.
var cells = this.templateRow.childNodes;
for (var i = 0; i < cells.length; i++)
{
var cell = cells.cloneNode(true);
row.appendChild(cell);
}
Basically, I need to come up with a way to copy the attributes from the
the template row to the new row along with all the cells.
I've tried using the cloneNode method on the template row and assigning
the returned element to the row object that was created. This does not
work. Inside these row objects properties have been added, and if I'm
reading this code correctly, it appears that some TR level functions
have been added as well.
Thanks in advance. This has been wreaking some havoc on me for a while
and I don't currently see a solution to it. Thanks!
Mike G.