outre2001
08-29-2006, 03:30 PM
Simple Tree Menu
http://www.dynamicdrive.com/dynamicindex1/navigate1.htm
Hello all,
hoping that someone have come across and already solved this problem.
Here's what I'm seeing: Simple Tree Menu ignores its default "all collapsed" settings or the rel="closed" and opens with its subtrees expanded. I can close a subtree manually, but that's not the behavior that I need.
I have not made any modifications to the code nor the css file. They are fresh from DD. And my test page has nothing else on it just the menu.
The same incorrect behavior occurs in FF1.5 and IE6.
Any insight would be much appreciated.
Here's my page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script type="text/javascript" src="javascript/simpletreemenu.js">
/***********************************************
* Simple Tree Menu- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>
<link rel="stylesheet" type="text/css" href="simpletree.css" />
</head>
<body>
<ul id="treemenu" class="treeview">
<li><a href="#">services</a>
<ul>
<li><a href="#">graphic</a></li>
<li><a href="#">web</a></li>
<li><a href="#">photography</a></li>
<li><a href="#">copywriting</a></li>
<li><a href="#">direct mail</a></li>
</ul>
</li>
<li><a href="#">portfolio</a></li>
<li><a href="#">contact us</a></li>
<li><a href="#">about t.a.</a></li>
</ul>
<script type="text/javascript">
//creates the tree menu
//ddtreemenu.createTree(treeid, enablepersist, opt_persist_in_days (default is 1))
ddtreemenu.createTree("treemenu", false);
</script>
</body>
</html>
P.S. Looking through the DD code I noticed that none of the lines are terminated with ';' I'm a relative beginner with Javascript but I thought that every statement must end with ';'. What am I missing? Thanks
http://www.dynamicdrive.com/dynamicindex1/navigate1.htm
Hello all,
hoping that someone have come across and already solved this problem.
Here's what I'm seeing: Simple Tree Menu ignores its default "all collapsed" settings or the rel="closed" and opens with its subtrees expanded. I can close a subtree manually, but that's not the behavior that I need.
I have not made any modifications to the code nor the css file. They are fresh from DD. And my test page has nothing else on it just the menu.
The same incorrect behavior occurs in FF1.5 and IE6.
Any insight would be much appreciated.
Here's my page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script type="text/javascript" src="javascript/simpletreemenu.js">
/***********************************************
* Simple Tree Menu- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>
<link rel="stylesheet" type="text/css" href="simpletree.css" />
</head>
<body>
<ul id="treemenu" class="treeview">
<li><a href="#">services</a>
<ul>
<li><a href="#">graphic</a></li>
<li><a href="#">web</a></li>
<li><a href="#">photography</a></li>
<li><a href="#">copywriting</a></li>
<li><a href="#">direct mail</a></li>
</ul>
</li>
<li><a href="#">portfolio</a></li>
<li><a href="#">contact us</a></li>
<li><a href="#">about t.a.</a></li>
</ul>
<script type="text/javascript">
//creates the tree menu
//ddtreemenu.createTree(treeid, enablepersist, opt_persist_in_days (default is 1))
ddtreemenu.createTree("treemenu", false);
</script>
</body>
</html>
P.S. Looking through the DD code I noticed that none of the lines are terminated with ';' I'm a relative beginner with Javascript but I thought that every statement must end with ';'. What am I missing? Thanks