OZONE Asylum
Forums
DHTML/Javascript
changing css classes
This page's ID:
29695
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
Hullo. I am developing in IE, no access to FF or Opera right now, and I am in a bit of a "have to get that right - now" cause the assignment is over on Friday (and it's 6pm). This works in IE, however, I think "className" was an IE attribute only, but cannot google any decent referenc about the topic : [code] <script type="text/javascript"> // ** Pages <div>isions handler script var divs = null; var links = null; function init(){ links = document.getElementById("menu").getElementsByTagName("a"); var tempDivs = document.getElementsByTagName("div"); for(i = 0; i<tempDivs.length; i++){ if(tempDivs[i].className == "serverBlock"){ alert(i); } } } window.onload = init; </script> [/code]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »