Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

className equivalent in NS6? 1

Status
Not open for further replies.

gacaccia

Technical User
May 15, 2002
258
US
hi all,

i'm trying to find out if there's an equivalent property in ns6 to ie6's "className". for example,
Code:
document.all.div1.className = newClass;
.

to put it another way, can the class for an element be changed in ns6?

thanks,

glenn
 
Exactly the same - className, but you should know that there is no such this as document.all in NS6 - you must browse by DOM to element - for example using document.getElementById. Michael Dubner
Brainbench MVP/HTML+JavaScript

 
cool. easy answers are the best!

thanks,

glenn
 
if you want you can access all your elements using document.getElementById(id) by adding this to your pages :

if (!document.getElementById && document.all)
{
document.getElementById = function(id)
{
return document.all[id]
}
} Gary Haran
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top