I have a menu tree made in CSS and Java, its working great until I use anchor in my links. If I use anchor in the link, the destination page get distorted, the menu instead of staying open in the right section, it open every sections of the menu.
the part of the script that control the open is
[code]
function ED_TMopen(){
var i,x,d,hr,ha,ef,a,ag;if(document.getElementById){d=document.getElementById(‘EDTMnav’);
if(d){hr=window.location.href;ha=d.getElementsByTagName(“A”);if(ha&&ha.length){
for(i=0;i<ha.length;i++){if(ha[i].href){if(hr.indexOf(ha[i].href)>-1){
ha[i].className=”EDcurrentmark”;a=ha[i].parentNode.parentNode;while(a){
if(a.firstChild && a.firstChild.tagName==”A”){if(a.firstChild.onclick){
ag=a.firstChild.onclick.toString();if(ag&&ag.indexOf(“ED_TMenu”)>-1){
ED_TMenu(a.firstChild,1);}}}a=a.parentNode;}}}}}}}
}
EDTMnav is the menu name
EDcurrentmark is the CSS specification where its specified that the text is bold and in blue.
If the anchor create this much problem, can we just set the java so the EDcurrentmark specifications can be applied only for the parent menu?
or specifying to let the menu closed when there is a link with an anchor?