Hi Hugh,
Long time no see ;)
You can use the className property to change the class info for an entire object. The following example shows hows this works (it's really simple; just set myObject.className = 'NewClassName';):
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Change CSS Class</title>
<style type="text/css">
.ClassOut
{
background-color: black;
color: white;
font-weight: bold;
}
.ClassOver
{
background-color: white;
color: black;
font-weight: bold;
border: 1px solid black;
}
</style>
</head>
<body>
<p class="ClassOut" onMouseOver="this.className='ClassOver';"
onMouseOut="this.className='ClassOut';">
Hi, I am a paragraph with text. If you hover your mouse
over me, my color changes . This is done by setting the
<a href="http://msdn.microsoft.com/library/default.asp?
url=/workshop/author/dhtml/reference/dhtml_reference_entry.asp?frame=true">
className</a> CSS property.
</p>
</body>
</html>
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.