Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting child node within the stylesheet
Message
From
29/03/2002 12:56:31
 
 
To
All
General information
Forum:
Internet
Category:
DHTML
Title:
Getting child node within the stylesheet
Miscellaneous
Thread ID:
00639003
Message ID:
00639003
Views:
55
I have the following style defined in a stylesheet:
TABLE.Menu
{
   BACKGROUND-COLOR: #<%=gcThemeColorBackground%>;
   border-bottom: 1px solid #<%=gcThemeColorBorder%>;
}

TABLE.Menu TD
{
   BORDER-COLLAPSE: collapse;
   BORDER: 1px solid #<%=gcThemeColorBorder%>;
   FONT-SIZE: 8pt;
   COLOR: "#303F30";
   border-bottom: none;
}
The following javascript code allows me to gain an object reference to the style:
loElements=document.getElementsByTagName('TABLE')
for (lnCompteur=0; lnCompteur<loElements.length; lnCompteur++)
{
   loNode=loElements.item(lnCompteur);
   for (lnCompteur2=0; lnCompteur2<loNode.attributes.length; lnCompteur2++)
   {
      if (loNode.attributes.item(lnCompteur2).nodeName=='class')
      {
         if (loNode.attributes.item(lnCompteur2).nodeValue=='Menu')
         {
            ...do something
However, the reference I have is the top level of the class only. So, I can only manipulate the Menu.BACKGROUND-COLOR for example but can't manipulate Menu TD.BORDER-COLLAPSE as this one is a child node of the object reference that I have.

Anyone found a way to get an object reference of a child node of that reference?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Reply
Map
View

Click here to load this message in the networking platform