1) Script Title: ddtreemenu
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/navigate1.htm
3) Describe problem: IE 8 is reporting "Error: 'ddtreemenu' is undefined"
It works fine in Chrome, but I can't figure out how to fix it. I can't post the link because its inside my firewall, but here is the code:
<head>
<style>
#tree {/* body Div */
margin-left: 0px;
height: 250px;
}
.treeview ul{ /*CSS for Simple Tree Menu*/
margin-left: 0px;
margin: 0px;
padding-left: 10px;
text-indent: 0px;
font-family:"Arial";
}
.treeview li{ /*Style for LI elements in general (excludes an LI that contains sub lists)*/
background: white url(list.gif) no-repeat left center;
list-style-type: none;
padding-left: 0px;
text-indent= 2px;
margin-left: 0px;
margin-bottom: 3px;
color: #000000;
font-weight: normal;
font-size: small;
font-family:"Arial";
}
.treeview li.submenu{ /* Style for LI that contains sub lists (other ULs). */
background: white url(closed.gif) no-repeat left 1px;
cursor: hand !important;
cursor: pointer !important;
color: #00b5e6;
font-weight: bold;
text-indent: 0px;
font-family:"Arial";
}
.treeview li.submenu ul{ /*Style for ULs that are children of LIs (submenu) */
display: none; /*Hide them by default. Don't delete. */
color: #000000;
font-weight: bold;
font-family:"Arial";
}
.treeview .submenu ul li{ /*Style for LIs of ULs that are children of LIs (submenu) */
cursor: default;
}
a:link {
color: #00b5e6;
font-family:"Arial";
}
a:visited {color: #00b5e6;}
table, tr, td{
vertical-align: top;
text-align: left;
height: 600px;
overflow: auto;
}
</style>
<script type="text/javascript" src="https://sites.google.com/site/mylanjive/files/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>
</head>
<body>
<table>
<tr>
<td>
<a font-size: small; font-family:"Arial"; text_indent: 5px; align: middle; color: #00b5e6 href="javascript:ddtreemenu.flatten('locations', 'expand')">Expand All</a> | <a href="javascript:ddtreemenu.flatten('locations', 'contact')">Collapse All</a>
<ul style="margin-left: -10px; padding=0px; list-style-position:inside;" id="locations" class="treeview">
<li>North America
<ul>
<li>Canada</li>
<li>United States
<ul>
<li>Cannonsburg, PA
<ul>
<li><a href="https://jive.mylan.com/groups/fountainhead">Fountainhead</a></li>
<li><a href="https://jive.mylan.com/message/4023#4023">Global Center</a></li>
<li><a href="https://jive.mylan.com/groups/southpoint">Southpointe</a></li>
</ul></li>
<li>Greensboro, NC</li>
<li>Morgantown, WV
<ul>
<li><a href="https://jive.mylan.com/groups/mylan-morgantown">Chestnut Ridge (MPI)</a></li>
<li>Collins Ferry</li>
<li><a href="https://jive.mylan.com/groups/greenbag-road-morgantown-wv-us">Greenbag Road</a></li>
</ul></li>
<li>Napa Valley, CA (Dey)</li>
<li>New Jersey (Dey)</li>
<li>New York</li>
<li>Puero Rico</li>
<li>Rockford, IL (UDL)</li>
<li>St. Albans, VT (MTI)</li>
<li>Texas
<ul>
<li>Allen, TX (Dey)</li>
<li>Sugarland, TX (UDL)</li>
</ul></li>
<li>Washington, D.C.</li>
</ul></li>
</ul></li>
<li>EMEA
<ul>
<li>Austria</li>
<li>Belgium
<ul>
<li>Docpharma Belgium</li>
<li>Mylan Belgium</li>
</ul></li>
<li>Czech Republic</li>
<li>France</li>
<li>Germany
<ul>
<li>Darmstadt</li>
<li>Stuttgart</li>
</ul></li>
<li>Greece</li>
<li>Hungary
<ul>
<li>Budapest</li>
<li>Komarom</li>
</ul></li>
<li>Ireland
<ul>
<li>Dublin
<ul>
<li>Gerard</li>
<li>Respiratory</li>
</ul></li>
<li>Galway (Insitutional)
<ul>
<li>Casla</li>
<li>Inverin</li>
</ul></li>
<li>Northern Cross</li>
</ul></li>
<li>Italy</li>
<li>Luxembourg</li>
<li>Netherlands</li>
<li>Poland</li>
<li>Portugal</li>
<li>Russia</li>
<li>Slovakia</li>
<li>Slovenia</li>
<li>South Africa</li>
<li>Spain</li>
<li>Sweden</li>
<li>Switzerland
<ul>
<li>Geneva (Insitutional)</li>
<li>Rolle</li>
<li>Zurich</li>
</ul></li>
<li>United Kingdom (UK)
<ul>
<li>Cambridge</li>
<li>Potters Bar</li>
<li>Sandwich</li>
</ul></li>
</ul></li>
<li>APAC
<ul>
<li>Australia
<ul>
<li>Corporate Office</li>
<li>Melbourne</li>
<li>Queensland
<ul>
<li>Manufacturing</li>
<li>Distribution</li>
</ul></li>
</ul></li>
<li>China</li>
<li>India
<ul>
<li>Matrix Labs</li>
<li>Development Centre</li>
</ul></li>
<li>Japan</li>
<li>New Zealand</li>
<li>Taiwan</li>
</ul></li>
</ul>
<script type="text/javascript">
//ddtreemenu.createTree(treeid, enablepersist, opt_persist_in_days (default is 1))
javascript:ddtreemenu.createTree("locations", false)
javascript:ddtreemenu.flatten('locations', 'contact')
</script>
</td></tr></table>
</body>
-----------------------------------------------------
This seems to be a common problem with IE8 and javascript, but I haven't found a solution yet!
Any help is appreciated!



Reply With Quote


Bookmarks