Answers

Jul 11, 2008 - 02:52 PM
if(typeof(window.external) != 'undefined'){
//yes, this is evil browser sniffing, but only IE has this bug
document.getElementsByName = function(name, tag){
if(!tag){
tag = '*';
}
var elems = document.getElementsByTagName(tag);
var res = []
for(var i=0;i att = elems[i].getAttribute('name');
if(att == name) {
res.push(elems[i]);
}
}
return res;
}
}
its from msdn forums
ps. tag is optional for this method, it will default to wildcard * if not specified (meaning it will check all elements in the document for given name)
//yes, this is evil browser sniffing, but only IE has this bug
document.getElementsByName = function(name, tag){
if(!tag){
tag = '*';
}
var elems = document.getElementsByTagName(tag);
var res = []
for(var i=0;i
if(att == name) {
res.push(elems[i]);
}
}
return res;
}
}
its from msdn forums
ps. tag is optional for this method, it will default to wildcard * if not specified (meaning it will check all elements in the document for given name)

Mar 04, 2009 - 06:07 AM
The question looks to be abandoned by the user who asked it. If no action is taken within 2 days, a Quomon Moderator will consider closing the question and distributing the points.
The Quomon Team
The Quomon Team
Add New Comment