PDA

View Full Version : Text-based navigation.



joshd
08-29-2007, 03:35 PM
Hi folks,

Forgive me for being slightly brash, but i am still trying to get my head around code as such.

I am trying to hack this script to get it how i want.
Basically I want to add a second menu, but im not sure how to align it so it sits to the right of the "INFORMATION" menu, and also I am wanting to have the contents of the menus displaying other content, (such as images or text, and some images have code with them too)

this might be too complex to do???


<html>
<head>

<style type="text/css">
a:link {color: #000000}
a:visited {color: #000000}
a:hover {color: #00ADEF}
a:active {color: #000000}

p.small {line-height: 90%}

</style>

<script language="javascript">
function xMenu1(){
if(document.getElementById('xChild1').style.display=='none'){document.getElementById('xChild1').style.display='block';}else{document.getElementById('xChild1').s tyle.display='none';}
if(document.getElementById('xChild2').style.display=='none'){document.getElementById('xChild2').style.display='block';}else{document.getElementById('xChild2').s tyle.display='none';}
}
function xMenu2(){
if(document.getElementById('xChild3').style.display=='none'){document.getElementById('xChild3').style.display='block';}else{document.getElementById('xChild3').s tyle.display='none';}
}
function xMenu3(){
if(document.getElementById('xChild4').style.display=='none'){document.getElementById('xChild4').style.display='block';}else{document.getElementById('xChild4').s tyle.display='none';}
if(document.getElementById('xChild5').style.display=='none'){document.getElementById('xChild5').style.display='block';}else{document.getElementById('xChild5').s tyle.display='none';}
}
function xMenu4(){
if(document.getElementById('xChild6').style.display=='none'){document.getElementById('xChild6').style.display='block';}else{document.getElementById('xChild6').s tyle.display='none';}
if(document.getElementById('xChild7').style.display=='none'){document.getElementById('xChild7').style.display='block';}else{document.getElementById('xChild7').s tyle.display='none';}
}

</script>


</head>


<body>

<div style="width:150px;">
<div class="style1" id="parentX" onClick="xMenu1();"style="cursor:pointer;">INFORMATION</div>

<div class="style1" id="xChild1" style="display:none;"><div id="childX"><a href="http://www.google.com/">new 1</a></div></div>
<div class="style1" id="xChild2" style="display:none;"><div id="childX"><a href="http://www.google.com">new 2</a></div></div>

<p>&nbsp;</p>
<p>&nbsp;</p>

</body>

</html>