Jump to content

navigation bar


b_suneetha
 Share

Recommended Posts

hi all,i had written the code like thz,,but i am not getting the reference page in tha same window,,,can anybody aolve thz as i am new to thz.<html ><head><meta http-equiv="Content-Type" content="text/html><script type="text/javascript"><!--window.onload=montre;function montre(id) {var d = document.getElementById(id); for (var i = 1; i<=10; i++) { if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';} }if (d) {d.style.display='block';}}//--></script><style type="text/css"><!--body {background: white;padding:0;margin:0;font-family: verdana, arial, sans-serif;font-size: 90%;color: black;}dl, dt, dd, ul, li {margin: 0;padding: 0;list-style-type: none;}#menu {position: absolute;top: 1em;left: 1em;width: 10em;}#menu dt {cursor: pointer;background: #A9BFCB;height: 20px;line-height: 20px;margin: 2px 0;border: 1px solid gray;text-align: center;font-weight: bold;}#menu dd {position: absolute;z-index: 100;left: 8em;margin-top: -1.4em;width: 10em;background: #A9BFCB;border: 1px solid gray;}#menu ul {padding: 2px;}#menu li {text-align: center;font-size: 85%;height: 18px;line-height: 18px;}#menu li a, #menu dt a {color: #000;text-decoration: none;display: block;}#menu li a:hover {text-decoration: underline;}#mentions {font-family: verdana, arial, sans-serif;position: absolute;bottom : 200px;left : 10px;color: #000;background-color: #ddd;}#mentions a {text-decoration: none;color: #222;}#mentions a:hover{text-decoration: underline;}--></style></head><body><!-- Menu --><dl id="menu"> <dt onmouseover="java script:montre('smenu1');"><a href="#">Category</a></dt> <dd id="smenu1" onmouseover="java script:montre('smenu1');" onmouseout="java script:montre();"> <ul> <li><a href="logo.jpg" target="_top">categ</a></li> <li><a href="#">Menu 1.2</a></li> <li><a href="#">Menu 1.3</a></li> </ul> </dd> <dt onmouseover="java script:montre('smenu2');" onmouseout="java script:montre();">Menu 2</dt> <dd id="smenu2" onmouseover="java script:montre('smenu2');" onmouseout="java script:montre();"> <ul> <li><a href="#">Menu 2.1</a></li> <li><a href="#">Menu 2.2</a></li> </ul> </dd> <dt onmouseover="java script:montre('smenu3');" onmouseout="java script:montre();">Menu 3</dt> <dd id="smenu3" onmouseover="java script:montre('smenu3');" onmouseout="java script:montre();"> <ul> <li><a href="#">Menu 3.1</a></li> <li><a href="#">Menu 3.1</a></li> <li><a href="#">Menu 3.1</a></li> <li><a href="#">Menu 3.1</a></li> <li><a href="#">Menu 3.1</a></li> <li><a href="#">Menu 3.1</a></li> </ul> </dd> <dt onmouseover="java script:montre('smenu4');" onmouseout="java script:montre();">Menu 4</dt> <dd id="smenu4" onmouseover="java script:montre('smenu4');" onmouseout="java script:montre();"> <ul> <li><a href="#">Menu 4.1</a></li> <li><a href="#">Menu 4.1</a></li> </ul> </dd></dl><div id="mentions">Raphael GOETTER<br /> <a href="http://www.alsacreations.com">Alsacréations</a><br /> <a href="http://tutorials.alsacreations.com/deroulant">Back</a></div></body></html>

Link to comment
Share on other sites

I saw a error in your javascript.

for(i=0;i=i;i++){}

U must not put var in front of the i.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...