can anyone give me a sample script on how to insert a row at a time
into an html table, more importantly, are there any differences while
implementing on NN and IE?
Thank you!! and Happy new year!!
tony
Sent via Deja.com
http://www.deja.com/
with (document){
var x=createElement('TR'), y=createElement('TD');
y.innerHTML="This New Cell's Text";
x.appendChild(y);
getElementById['myTable'].appendChild(x)}
IE 4.0-5.5 still uses an older non-W3C proprietory method....
var y=myTable.insertRow(), x=y.insertCell();
x.innerText="This New Cell's Text";
IE3, NN4, Opera 4....
- No can do. Not sure about Opera 5, but should be same as NN6.
- Peter
<tones...@hotmail.com> wrote in message news:92sjd8$pfc$1...@nnrp1.deja.com...
For the record, there are no "static" objects any more between the
<body></body> tags in modern browsers. Any element is insertable,
editable, deletable.
Your statements above would have been false as far back as 3 years
ago, when IE4.0 supported methods for the insertion and deletion of
table elements.
- Peter
Eh. If you're shooting for backwards compatability (read: ECMAScript
by the book), that ain't true, either.
I try to avoid browser-specific code...
dave
Tell me more about what you're doing and I may be able to help.