...

insertRow and insertCell

eggman
03-21-2003, 03:47 PM
Can anyone tell me what supports insertRow and insertCell?

Also, can anyone provide me with links to DOM documentation for browsers other than IE?

Thank you in advance.

eggman
03-21-2003, 05:16 PM
Silly me... I found what I was looking for at W3C. Glad to see both methods are specified. Saves me a lot of re-coding.

liorean
03-21-2003, 09:54 PM
Most browsers support the table methods in some way, but I wouldn't use them too extensively if I were you - they are very crude tools compared to the regular DOM methods. In fact, so much that if you have ie (yes, that covers most pages, doesn't it?), or safari users visiting your page, I would very much NOT recommend it.

See <http://www.xs4all.nl/~ppk/js/index.html?version5.html> and <http://www.xs4all.nl/~ppk/js/innerhtml.html> for a bit of support data.

eggman
03-21-2003, 10:07 PM
Thanks for the additional info. :)

I'm retired but enjoy helping others out. My latest projects involved IE on MS intranets and so I am guilty of becoming a bit lazy about my script.

However, your point is well taken. The original intent was to build table contents after the onload event. Which particular 'regular DOM methods' are you referring to? I thought insertRow and insertCell are part of the 2.0 specifications. Are they being discarded or deprecated? (Did I ask that right?)

liorean
03-22-2003, 01:25 AM
Well, the "regular" DOM methods I talked about, are those defined by DOM Core and getElementById. The table methods are defined by DOM HTML.

Generally, the browsers have less optimised code for DOM HTML than DOM Core, Opera 7 being the only exception I know of.

eggman
03-22-2003, 02:00 AM
Thanks for the clarifying the distinction. :)

Dang, just when I was beginning to enjoy HTML they had to go get an Element By Id and DOM a Core on me...

brothercake
03-22-2003, 03:24 AM
I know the feeling ... my previousSibling had kittens looking for his firstChild; in the end he had to getElementsByTagName, and there it was, playing with the other childNodes :p



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum