Are you sure this is not this kind of problem ? Look at this interestingly, I did not know this before.
However, to complement what was already suggested by David Dorward, you write a function like the one below.
function getElement (id) { if (document.getElementById) { return document.getElementById(id); } else if (document.all) { return window.document.all[id]; } else if (document.layers) { return window.document.layers[id]; } }
Adele ansari
source share