Welcome to www.mmclean.ca!
2 Nov 2026
Summary
This page demonstrates a very simple technique that may be used to "hide" data on a page and make it visible without having to generate a new page in order to update viewable content.

Expanding and Collapsing Block Elements

When creating web content, it can be beneficial to "hide" small sections of text or a form and have it "appear" when a user clicks on a link, for example. This allows the visible page content to be more prominent and allow the user to focus on specific data or images.

:: Error Wizard - Troubleshooting HTTP ::

The following JavaScript is responsible for expanding and collapsing the DIV's in the above example.

<script>
<!--//
function expandCollapse()
{
  try
  {
    for( var i=0; i<expandCollapse.arguments.length; i++ )
    {
      var element = document.getElementById( expandCollapse.arguments[i] );
      element.style.display = (element.style.display == 'none') ? 'block' : 'none';
    }
  }
  catch( e )
  {
    alert( 'ERROR :: expandCollapse()\n\n' + e );
  }
};
//-->
</script>