I’ve promised you to improve table row delete function, that’s what we will do today. So now we know the differences of DOM tree in different browsers. We saw that Firefox and Safari create additional text node “\n” so there are two ways to fix our delete row function: 1st - to delete these nodes, 2nd - just to pass them through.
(more…)
In previous article we programmed two functions: to add and remove a table row. But we had one issue in Safari and Firefox by removing a row. We had to click Delete button twice. To understand why this happens we need to see the DOM tree of our table, which each browser builds. You can use browser plugins, but now we will just develop our own simple JavaScript function to print DOM tree.
(more…)
I hope you know what DOM is. If no, then I would advise you to read first this tutorial.
We will try to write JavaScirpt code to add/remove rows to table but without using DHTML functions (addRow, addCell etc.), we will use functions to manipulate with DOM tree like appendChild, createElement, createTextNode.
(more…)