Hi guys,
not sure if you can help me, I have to get this left hand menu sorted and for some reason it won’t start contracted on certain pages but will on others, not sure why – pulling my hair out (I’m not a js coder)(all pages use same global file),
[URL=”http://www.petwise.com.au”]http://www.petwise.com.au
left hand menu starts out expanded which I don’t want… but on
[URL=”http://www.petwise.com.au/petadvice/?action=petadvice”]http://www.petwise.com.au/petadvice/?action=petadvice
the menu is collapsed which is what I want on every page
when you view source code of both pages it should behave the same.
the petadvice page is the only page that uses a different index file, so that is the only difference (index info below).
js menu code
<script type=”text/javascript”>
<!–
function exp_coll(ind)
{
s = document.getElementById(“sp_” + ind);
i = document.getElementById(“im
if (s.style.display == ‘none’)
{
s.style.display = ‘block’;
i.src = “assets/images/paw_minus.gif”;
}
else if (s.style.display == ‘block’)
{
s.style.display = ‘none’;
i.src = “assets/images/paw_plus.gif”;
}
}
function exp(ind)
{
s = document.getElementById(“sp_” + ind);
i = document.getElementById(“im
if (!(s && i)) return false;
s.style.display = ‘block’;
i.src = “assets/images/paw_plus.gif”;
}
function coll(ind)
{
s = document.getElementById(“sp_” + ind);
i = document.getElementById(“im
if (!(s && i)) return false;
s.style.display = ‘none’;
i.src = “assets/images/paw_plus.gif”;
}
function coll_all()
{
coll(0);
coll(9);
coll(33);
coll(85);
coll(87);
coll(90);
coll(91);
coll(92);
}
function exp_all()
{
exp(0);
exp(9);
exp(33);
exp(85);
exp(87);
exp(90);
exp(91);
exp(92);
}
–>
</script>
<BODY onload=”coll_all();
<li> <a href=”javascript:exp_coll(0);”><img src=”assets/images/paw_minus.gif” alt=”toggle” border=”0″ id=”im_0″ /></a>
<a href=”javascript:exp_coll(0);” STYLE=”text-decoration: none” >Dog</a>
[B]normal index ( for all pages other than pet advice pages – relevent bits only)
<?php
/* Load the SaveContent Class
require(“class.SaveContent.php”);
/* Create a new instance of the SaveContent Class called $SC
$SC = new SaveContent();
/* Include Header File
include (“header.php”);
/* Make sure we don’t include the Left Navigation display if this is the onlineshop or mycart
if ((!($_GET[“action”] == ‘onlineshop’)) && (!($_GET[“action”] == ‘forum’)) && (!($_GET[“action”] == ‘catshop’)) && (!($_GET[“action”] == ‘fishshop’)) && (!($
include (“leftnav.php”);
[B]petadvice index (relevent bits):
?>
<?php
include (“../leftnav.php”);
?>
Does anybody have any ideas why it won’t expand on load on certain pages? Any help would be most appreciated ?
thanks a lot
Justin