A
Aaron Gray
Hi,
I know the 'document.getElementById()' issue is really over since every
browser since 1998 supports the W3C DOM standard, but I could not resist
this offering :-
if (!document.getElementById)
document.getElementById = function(id) { return document.all[id]; }
This should then provide a getElementById function if one does not already
exist.
Is anyone in a position to be able to test this code ?
You could go thurther and define :-
if (!document.getElementById)
if (document.all)
document.getElementById = function(id) { return
document.all[id]; }
else
document.getElementById = function(id) { return
document.layers[id]; }
Reference :-
http://www.jibbering.com/faq/faq_notes/not_browser_detect.html
Thanks,
Aaron
I know the 'document.getElementById()' issue is really over since every
browser since 1998 supports the W3C DOM standard, but I could not resist
this offering :-
if (!document.getElementById)
document.getElementById = function(id) { return document.all[id]; }
This should then provide a getElementById function if one does not already
exist.
Is anyone in a position to be able to test this code ?
You could go thurther and define :-
if (!document.getElementById)
if (document.all)
document.getElementById = function(id) { return
document.all[id]; }
else
document.getElementById = function(id) { return
document.layers[id]; }
Reference :-
http://www.jibbering.com/faq/faq_notes/not_browser_detect.html
Thanks,
Aaron