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…)
Nowadays we have Google Maps with API, that helps us to creat great web applications with maps, but what if our city isn’t well detailed in Google Maps? Then we need to create something ours. Or we have a picture and need to determine the coordinates of mouse click.
I want to show you just simple example with the map. When user clicks on it - a little flag displays in this point. We need map.gif (picture with map) and pointer.gif (little picture with flag).
(more…)