Printing and Hover

liunx

Guest
Hi all,

I'm having a bit of trouble with a page I am making. It can be found here:
<!-- m --><a class="postlink" href="https://mywebspace.wisc.edu/graif/web/share/example2.htm">https://mywebspace.wisc.edu/graif/web/s ... ample2.htm</a><!-- m -->

Each underlined word should show a specific div box containing information on the word when the word (a link) is hovered over. I accomplish this with the following JavaScript:

<script type="text/javascript"><!--

function showLayer(layerName)
{
if (document.getElementById) // Netscape 6 and IE 5+
{
var targetElement = document.getElementById(layerName);
targetElement.style.visibility = 'visible';
}
}


function hideLayer(layerName)
{
if (document.getElementById)
{
var targetElement = document.getElementById(layerName);
targetElement.style.visibility = 'hidden';
}
}

// -->
</script>

An example link would appear as such: <a href=http://www.webdeveloper.com/forum/archive/index.php/"#" onmouseover="showLayer('1')" onmouseout="hideLayer('1')">Some</a>

When a user prints the page (I have a print.css sheet for this), I would like ALL layers to be shown. Unfortunately, because of how my style sheet words, when a user hover over and then moves out of a link the layer is hidden.

I am looking for some way to make this JavaScript only function on the main style sheet and not affect the styles in the print.css view. I would like the print view to show all layers, regardless of whether they have moused over the link.

Any ideas? I greatly appreciate any help or guidance anyone could provide.

THANKS!
 
Back
Top