User Profile

Collapse

Profile Sidebar

Collapse
TidalWave
TidalWave
Last Activity: Nov 21 '08, 09:08 PM
Joined: Nov 18 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • TidalWave
    replied to Applying a style to an onClick event
    I thought I did post the loop in the for statement of my javascript, no?
    Code:
    function secondarymenuToggle(name,id) {
               var eArray = document.getElementsByTagName('DIV');
               var ele = document.getElementById(id);
        
              for (i = 0; i < eArray.length; i++)
               {
                  if (eArray[i].getAttribute('name') == name)
                      eArray[i].className="SecondaryMenu";
    ...
    See more | Go to post

    Leave a comment:


  • TidalWave
    replied to Applying a style to an onClick event
    Sure and I was able to troubleshoot down to what the actual problem is. Here's the output:

    Code:
    <tr>
    <td>
    <div class="SecondaryMenuActive" 
    onclick="secondarymenuToggle('levelone','levelone5');
    secondarymenuToggle('leveltwo','')" name="levelone" id="levelone5">
    <div class="SecondaryMenu">Reports</div></td>
    ...
    See more | Go to post

    Leave a comment:


  • TidalWave
    started a topic Applying a style to an onClick event

    Applying a style to an onClick event

    I have a horizontal navigation. When you click a navigation link that has a child menu, this menu pops out to the side and the parent link gets a background-color applied to it. If the navigation link does not have a child menu, you are taken right to the page, but the active link should still get a background-color applied to it.

    However, what is happening is, when I click on a childless link, a parent link above it gets the background...
    See more | Go to post
No activity results to display
Show More
Working...