What's Here?
- Members: 131,917
- Replies: 470,175
- Topics: 72,874
- Snippets: 2,538
- Tutorials: 665
- Total Online: 1,691
- Members: 61
- Guests: 1,630
Who's Online?
|
While trying to make a "reloading" script for use with my transparent HTML/CSS backgrounds I came across a problem with IE. I couldn't use object.getElementsByName()! So I came up with this solution. Granted it's limited to one kind of tag right now, but it should make coding standard (X)HTML a little easier.
|
Submitted By: snoj
|
|
Rating:
 
|
|
Views: 20,212 |
Language: JavaScript
|
|
Last Modified: November 11, 2005 |
Snippet
function getElementsByName_iefix(tag, name) {
var elem = document.getElementsByTagName(tag);
var arr = new Array();
for(i = 0,iarr = 0; i < elem.length; i++) {
att = elem[i].getAttribute("name");
if(att == name) {
arr[iarr] = elem[i];
iarr++;
}
}
return arr;
}
Copy & Paste
|
|
|
Programming
Web Development
Reference Sheets
Bye Bye Ads
Free DIC T-Shirt
Related Sites
Monthly Drawing
Partners
Top Contributors
Top 10 Kudos This Month
|