Skip Navigation | Home | Code Samples | Articles | Links | About | Contact Me | Make a Payment

Toggle Display

Nested Lists

  1. Fruits
    1. Apples
    2. Oranges
    3. Pears
    4. Bananas
  2. Veggies
    1. Cabbage
    2. Carrots
    3. Onions
    4. Sprouts
  3. Cereals
    1. Rice
    2. Wheat
    3. Oats


  1. What are the inherent dangers of using a tape backup system?

  1. Backup tapes have a variety of inherent issues. Tapes have a limited number of uses before they are worn out. Dirty tape drives can cause backups to appear successful when in actuality no data has been written to the tape. Tapes can have a bad spot on the tape - a crease, fold or dirt smudge - that can prevent data from being read during a restore procedure. Employees can forget to change out tapes and cause the backup not to run.

  1. What hardware do I need to purchase?

  1. There is no hardware that you are required to purchase. All your company is required to purchase is a server license and any agents that you want to utilize.

  1. Who has access to my data?

  1. Before transfer, backup data is encrypted and remains encrypted until it is restored on the client computer. There are no "back door" decryption keys. Only the individual that created the password can access the backup data.

var toggledDisplay = new Object();
    toggledDisplay['sub1'] = true;
    toggledDisplay['sub2'] = true;
    toggledDisplay['sub3'] = true;

function toggleDisplay(bDisplayed)
  if(!document.getElementById || toggleDisplay.arguments.length < 2) return;
  var displayed = new Object();
      displayed['true'] = 'block';
      displayed['false'] = 'none';
  for(var i = 1; i < toggleDisplay.arguments.length; i++)
    oDisplay = document.getElementById(toggleDisplay.arguments[i]);
    { = displayed[bDisplayed];
      // mozilla is the only browser out of the lot that can't get this right.  so, if we're
      // setting an object's display style to block, we gotta reload any images contained
      // within that block.  mozilla won't do it for you like every other browser that
      // supports the functionality of changing the display style dynamically.
      // begin crap browser hack
        oImages = oDisplay.getElementsByTagName('IMG');
        for(var j = 0; j < oImages.length; j++)
          oImages[j].src = oImages[j].src;
      // end mozilla, err, crap browser hack
       if(typeof toggledDisplay[toggleDisplay.arguments[i]] != 'undefined')
        toggledDisplay[toggleDisplay.arguments[i]] = !bDisplayed;

The only thing you need to edit is the properties of the toggledDisplay object. Create as many properties with an inital value of true as you're going to have toggled elements on the page. Then put together your HTML something like this:

  <li onclick="toggleDisplay(toggledDisplay['sub1'], 'sub1')">Fruits
  <ol id="sub1">
  <li onclick="toggleDisplay(toggledDisplay['sub2'], 'sub2')">Veggies
  <ol id="sub2">
  <li onclick="toggleDisplay(toggledDisplay['sub3'], 'sub3')">Cereals
  <ol id="sub3">

  <script language="JavaScript" type="text/javascript">
    toggleDisplay(false, 'sub1', 'sub2', 'sub3');
    toggleDisplay(true, 'toggleAll');