Hey, what if a vistor to your website has an old browser that doesn’t have the function document.getElementsByTagName already defined?
I have already created a backdoor for the document.getElementById function,
see my sig.
This thread will be used to develop such a function at Mr. Anonymous ‘s request.
My current progress with the function requires the user’s browser to be either
FF or IE…I’m working on getting it to work with NS.
Also, do any early browsers support [color=royalblue]nodeName[color=royalblue]outterHTML
Here’s my progress:
(I renamed the function to getElement[b]z
[code=html]
<SCRIPT LANGUAGE=”JavaScript” TYPE=”text/javascript”>
if(document.all)
document.getElementzByTagName=function(){
arguments[0]=arguments[0].toUpperCase()
var temp=[]
for(var i in document.all){
if(document.all[i].nodeName==arguments[0])
temp[temp.length]=document.all[i]
}
return temp
}
onload=function(){
var e=document.getElementzByTagName(“a”)
alert(e[0].ElementMessage+”n”+e[1].ElementMessage)
}
</SCRIPT>
<a ElementMessage=”first tag”>
<a ElementMessage=”second tag”>