[Javascript] Using same script for a second purpose

Richard nomorebull at charter.net
Fri Jan 28 19:22:50 CST 2005


The short script is shown below.
I have a basic layout of 2 columns.
Column 1 on the left for the main menu.
Column 2 is split in two parts.

When an item is clicked on in column 1, column 2a shows the thumbnails.
Consider this a form of image swapping but for text.
What I would like to do now is, to incorporate a means when a thumbnail is
clicked on, a large image is shown below that along with a description.
So far, using the bare bones image swapping works fine, but no descriptions.
Not to mention being cumbersome and adding a lot of useless duplicated
script.

I have tried simply renaming the vairables, in a second script, which almost
works.
But all that does is, replace the "FirstOn" item which destroys the
thumbnails.
I need to maintain the thumbnails in place.
For a working demo of my inquiry see www.somestuff.batcave.net/menu1.html


var kid = "FirstOn"
function ShowInfo(DivId)
  {
  document.getElementById(kid).style.display = 'none';
  document.getElementById(DivId).style.display = 'block';
  kid = DivId;
  }




More information about the Javascript mailing list