|
I found a script for hiding a print button when clicked, and I've amended the coding slightly to show a layer on mousing over an image instead. Hope it helps.
In the head, enter the following:
<script language="JavaScript" type="text/JavaScript">
<!-- Begin
// quick browser tests
var ns4 = (document.layers) ? true : false;
var ie4 = (document.all && !document.getElementById) ? true : false;
var ie5 = (document.all && document.getElementById) ? true : false;
var ns6 = (!document.all && document.getElementById) ? true : false;
function show(sw,obj) {
// show/hide the divisions
if (sw && (ie4 || ie5) ) document.all[obj].style.visibility = 'hidden';
if (!sw && (ie4 || ie5) ) document.all[obj].style.visibility = 'visible';
if (sw && ns4) document.layers[obj].visibility = 'hidden';
if (!sw && ns4) document.layers[obj].visibility = 'visible';
}
// End -->
</script>
In the body, use the following:
<div align="center" id="divName">
<input name="Button" type="button" class="button" value="Print Certificate" >
</div>
<img src="image1.gif" width="200" height="81" onMouseOver="show(false,'divName')" onMouseOut="show(true,'divName')">
You can name the id anything you want (and obviously put whatever you need on it - I needed a button and left that bit as an example)
Since you are using the layer as navigation, you may not want to include the onMouseOut="show(true,'divName')" since that makes the layer disappear when your cursor leaves the image.
|