I really like the conveyor belt script!!!!
I want to press on an image in the conveyor belt (layer1), in a way that layer1 would be hidden and another conveyor belt (layer 2) will show up.
I use dreamweaver.
I've tried 2 different things:
1)
When i preview to see if it works, conveyor belt is gone. It doesn't workCode:leftrightslide[16]='<a href="#" onClick="MM_showHideLayers('layer1','','hide','layer2','','show')><img src="Menu/The_diary_of_bill.gif" onMouseOver="this.src=The_diary_of_bill_h.src" onMouseOut="this.src=The_diary_of_bill.src" border=no></a>'
2) I've another code to show and hide layers.
I put his code between the (head)(head)
and this code underneath in the conveyor belt:Code:<script language="javascript" type="text/javascript"> <!-- function showLayer(layerID) { if ((obj = getObj(layerID)) == false) { return false; } if (document.layers) { obj.visibility = "visible"; } else { obj.style.display = ""; } } function hideLayer(layerID) { if ((obj = getObj(layerID)) == false) { return false; } if (document.layers) { obj.visibility = "hide"; } else { obj.style.display = "none"; } } function getObj(layerID) { if (document.getElementById(layerID)) { return(document.getElementById(layerID)); } else if (document.getElementsByName(layerID)[0]) { return(document.getElementsByName(layerID)[0]); } else if (document.all[layerID]) { return(document.all[layerID]); } else if (document.layers[layerID]) { return(document.layers[layerID]); } else { return false; } } //--> </script>
When i preview to see if it works, conveyor belt is gone. It doesn't workCode:leftrightslide[16]='<a href="#" onClick="showLayer('layer2'); hideLayer('layer1');return false;"><img src="Menu/The_diary_of_bill.gif" onMouseOver="this.src=The_diary_of_bill_h.src" onMouseOut="this.src=The_diary_of_bill.src" border=no></a>'
But, when I delete the brackets by ('layer2') and ('layer1')
example: ' '
the conveyor belt works but the link gives an error.
Can annyone help me?
thanks anyway!!!



Reply With Quote

Bookmarks