[Javascript] Using same script for a second purpose

Dash forgetful54341087097153001984 at hotmail.com
Mon Feb 28 15:51:04 CST 2005


Hi Richard,

I've just joined this list, and was looking through it when i came over your email. have you sorted it out yet?

this might help, if you haven't. I like to use it for mouseover effects:

function showLayer(layerID){
 document.getElementById(layerID).style.visibility="visible";
}
    
function hideLayer(layerID){
 document.getElementById(layerID).style.visibility="hidden";
}

(layerID is the div's id) initially set the div with style="...;visibility:hidden;", it works fine on my ie6 and ns7

Dash




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;
  }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20050228/2c97720c/attachment.htm>


More information about the Javascript mailing list