P
Pauljh
Hi All,
I have a web page which builds a hidden table, as (based on certain
criteria) people can have multiple version of this table, not a
problem. But I need each table to have a unique id (that I know before
hand) and unique id's for each element (the id="" tags are assigned in
the original hidden table).
So I can't used CloneNode as this keeps the id's, can someone point
me in the right direction for a script which will copy nodes +
attributes (as far down as they go) (for any object type, as I might
change it from a table to a div in the future) and append a passed
variable to each id (if id!=null).
e.g. var newTable=copyNode(originalTab,tableId++)
where originalTab is a ref to the original table (might not
be an table in future, i.e. could be any HTML object)
tableId will be a unique number
Any help much appreciated
Paul
I have a web page which builds a hidden table, as (based on certain
criteria) people can have multiple version of this table, not a
problem. But I need each table to have a unique id (that I know before
hand) and unique id's for each element (the id="" tags are assigned in
the original hidden table).
So I can't used CloneNode as this keeps the id's, can someone point
me in the right direction for a script which will copy nodes +
attributes (as far down as they go) (for any object type, as I might
change it from a table to a div in the future) and append a passed
variable to each id (if id!=null).
e.g. var newTable=copyNode(originalTab,tableId++)
where originalTab is a ref to the original table (might not
be an table in future, i.e. could be any HTML object)
tableId will be a unique number
Any help much appreciated
Paul