Help with a menu

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
jjsaw5
Beginner
Beginner
Posts: 2
Joined: Thu Dec 13, 2007 4:28 pm

Help with a menu

Post by jjsaw5 »

Hello,

I am new to the site and I have a question. I am working with a menu with three levels, the third level opens strait down and i need it to open to the right. Is it possible that someone could take a look at my code if i post it and help me in the right direction?


Thanks much!
vikenk
Mega Advanced
Mega Advanced
Posts: 297
Joined: Tue Nov 29, 2005 7:38 pm

Re: Help with a menu

Post by vikenk »

It would be a big help if you could post a link or post your menu_data.js file so we can see what's going on. Generally, the menu should open to the left or right. Is your menu vertical or horizontal?
jjsaw5
Beginner
Beginner
Posts: 2
Joined: Thu Dec 13, 2007 4:28 pm

Re: Help with a menu

Post by jjsaw5 »

My Menu is horizontal and the first level of the menu drops strait down. I only have two sections of the menu that need the third level, and if possible i would like that to open to the right.

Here is the js code

Code: Select all

var cssmenuids=["cssmenu1"] //Enter id(s) of CSS Horizontal UL menus, separated by commas
var csssubmenuoffset=-1 //Offset of submenus from main menu. Default is 0 pixels.

function createcssmenu2(){
for (var i=0; i<cssmenuids.length; i++){
  var ultags=document.getElementById(cssmenuids[i]).getElementsByTagName("ul")
    for (var t=0; t<ultags.length; t++){
			ultags[t].style.top=ultags[t].parentNode.offsetHeight+csssubmenuoffset+"px"
    	var spanref=document.createElement("span")
			spanref.className="arrowdiv"
			spanref.innerHTML="&nbsp;&nbsp;&nbsp;&nbsp;"
			ultags[t].parentNode.getElementsByTagName("a")[0].appendChild(spanref)
    	ultags[t].parentNode.onmouseover=function(){
					this.style.zIndex=100
    	this.getElementsByTagName("ul")[0].style.visibility="visible"
					this.getElementsByTagName("ul")[0].style.zIndex=0
    	}
    	ultags[t].parentNode.onmouseout=function(){
					this.style.zIndex=0
					this.getElementsByTagName("ul")[0].style.visibility="hidden"
					this.getElementsByTagName("ul")[0].style.zIndex=100
					
    	}
    }
  }
}

if (window.addEventListener)
window.addEventListener("load", createcssmenu2, false)
else if (window.attachEvent)
window.attachEvent("onload", createcssmenu2)
vikenk
Mega Advanced
Mega Advanced
Posts: 297
Joined: Tue Nov 29, 2005 7:38 pm

Re: Help with a menu

Post by vikenk »

Ok...Your menu does not seem to be the Milonic menu. Maybe you got here by mistake? This is a support forum for the Milonic Menu only. If what you have is a Milonic menu, I certainly do not recognize any of the code. If not, try the MIlonic Menu out, it's a great menu! http://milonic.com

Sorry.
Post Reply