arepato
04-29-2013, 06:19 PM
1) Script Title: Smart Folding Menu Tree - old (replaced by Simple Tree Menu - new)
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/navigate1.htm
3) Describe problem:
The smart folding menu won't work in IE9 anymore (expand/close). Probably affected by windows update (on the server) yet it still works on other browsers such as new versions of Chrome and Firefox. I just found out that this very old script has been replaced by Simple Tree menu script which is why I can't find anything related to this version and for a possible fix. If possible, I would prefer to fix the old version as it would require a lot of manual coding/re-writing to use the new version.
Here's a shortened version of the html 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>
<title></title>
<!-- <meta content="IE=edge" http-equiv="X-UA-Compatible"> -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="css/Department_Resources.css" />
<base target="content" />
<!-- ============================================================================================================================================================ -->
<!-- ========================= SCRIPT COURTESY OF http://www.dynamicdrive.com =================================================================================== -->
<!-- ============================================================================================================================================================ -->
<style>
<!--
#foldheader{cursor:pointer;cursor:hand ; font-weight:bold ;
list-style-image:url(images/fold.gif)}
#foldinglistlink{list-style-image:url(images/link.gif)}
#foldinglistdoc{list-style-image:url(images/pdf.gif)}
//-->
</style>
<script language="JavaScript1.2">
<!--
//Smart Folding Menu tree- By Dynamic Drive (rewritten 03/03/2002)
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
//This credit MUST stay intact for use
var head="display:''"
img1=new Image()
img1.src="url(images/fold.gif)"
img2=new Image()
img2.src="url(images/open.gif)"
var ns6=(document.getElementById&&!document.all||window.opera)
var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1
function checkcontained(e){
var iscontained=0
cur=ns6? e.target : event.srcElement
i=0
if (cur.id=="foldheader")
iscontained=1
else
while (ns6&&cur.parentNode||(ie4&&cur.parentElement)){
if (cur.id=="foldheader"||cur.id=="foldinglistlink"||cur.id=="foldinglistdoc") {
iscontained=(cur.id=="foldheader")? 1 : 0
break
}
cur=ns6? cur.parentNode : cur.parentElement
}
if (iscontained){
var foldercontent=ns6? cur.nextSibling.nextSibling : cur.all.tags("UL")[0]
if (foldercontent.style.display=="none"){
foldercontent.style.display=""
cur.style.listStyleImage="url(images/open.gif)"
}
else{
foldercontent.style.display="none"
cur.style.listStyleImage="url(images/fold.gif)"
}
}
}
if (ie4||ns6)
document.onclick=checkcontained
//-->
</script>
</head>
<body>
<ul>
<hr/>
<li id="foldheader" class="bodyrollupH3">Reports and Links </li>
<ul id="foldinglist" style="display:none" style=&{head};>
<li id="foldheader" class="bodyrollup"> Academic Programs </li>
<ul id="foldinglist" style="display:none" style=&{head};>
<li id="foldheader" class="bodyrollup"> Degree, Diploma, Certificate (DDCP) Programs </li>
</ul>
</ul>
<hr/>
</ul>
</body>
</html>
Any help is appreciated. Thank you
AR
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/navigate1.htm
3) Describe problem:
The smart folding menu won't work in IE9 anymore (expand/close). Probably affected by windows update (on the server) yet it still works on other browsers such as new versions of Chrome and Firefox. I just found out that this very old script has been replaced by Simple Tree menu script which is why I can't find anything related to this version and for a possible fix. If possible, I would prefer to fix the old version as it would require a lot of manual coding/re-writing to use the new version.
Here's a shortened version of the html 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>
<title></title>
<!-- <meta content="IE=edge" http-equiv="X-UA-Compatible"> -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="css/Department_Resources.css" />
<base target="content" />
<!-- ============================================================================================================================================================ -->
<!-- ========================= SCRIPT COURTESY OF http://www.dynamicdrive.com =================================================================================== -->
<!-- ============================================================================================================================================================ -->
<style>
<!--
#foldheader{cursor:pointer;cursor:hand ; font-weight:bold ;
list-style-image:url(images/fold.gif)}
#foldinglistlink{list-style-image:url(images/link.gif)}
#foldinglistdoc{list-style-image:url(images/pdf.gif)}
//-->
</style>
<script language="JavaScript1.2">
<!--
//Smart Folding Menu tree- By Dynamic Drive (rewritten 03/03/2002)
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
//This credit MUST stay intact for use
var head="display:''"
img1=new Image()
img1.src="url(images/fold.gif)"
img2=new Image()
img2.src="url(images/open.gif)"
var ns6=(document.getElementById&&!document.all||window.opera)
var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1
function checkcontained(e){
var iscontained=0
cur=ns6? e.target : event.srcElement
i=0
if (cur.id=="foldheader")
iscontained=1
else
while (ns6&&cur.parentNode||(ie4&&cur.parentElement)){
if (cur.id=="foldheader"||cur.id=="foldinglistlink"||cur.id=="foldinglistdoc") {
iscontained=(cur.id=="foldheader")? 1 : 0
break
}
cur=ns6? cur.parentNode : cur.parentElement
}
if (iscontained){
var foldercontent=ns6? cur.nextSibling.nextSibling : cur.all.tags("UL")[0]
if (foldercontent.style.display=="none"){
foldercontent.style.display=""
cur.style.listStyleImage="url(images/open.gif)"
}
else{
foldercontent.style.display="none"
cur.style.listStyleImage="url(images/fold.gif)"
}
}
}
if (ie4||ns6)
document.onclick=checkcontained
//-->
</script>
</head>
<body>
<ul>
<hr/>
<li id="foldheader" class="bodyrollupH3">Reports and Links </li>
<ul id="foldinglist" style="display:none" style=&{head};>
<li id="foldheader" class="bodyrollup"> Academic Programs </li>
<ul id="foldinglist" style="display:none" style=&{head};>
<li id="foldheader" class="bodyrollup"> Degree, Diploma, Certificate (DDCP) Programs </li>
</ul>
</ul>
<hr/>
</ul>
</body>
</html>
Any help is appreciated. Thank you
AR