WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 Help with menu please, i'm stuck, Erik Smit, March 11, 2004
     Re:Help with menu please, i'm stuck, Mattes, March 12, 2004
         Re:Help with menu please, i'm stuck, Erik Smit, March 12, 2004
             Re:Help with menu please, i'm stuck, Mattes, March 12, 2004
                 Re:Help with menu please, i'm stuck, Erik Smit, March 13, 2004

Subject: Help with menu please, i'm stuck From: Erik Smit Date: March 11, 2004

I am trying to build a custom menu with XMenu (1.12). The last part just won't seem to work the way I want it.

here's the menu definition:

var myMenu1 = new WebFXMenu;
myMenu1.add(new WebFXMenuItem( "sub1-1" ));
myMenu1.add(new WebFXMenuItem( "sub1-2" ));

var myMenu2 = new WebFXMenu;
myMenu2.add(new WebFXMenuItem( "sub2-1" ));
myMenu2.add(new WebFXMenuItem( "sub2-2" ));

// 2nd horizontal menu bar
var myBar1 = new WebFXMenuBar;
myBar1.add(new WebFXMenuButton( "Bar1-1", null, null));
myBar1.add(new WebFXMenuButton( "Bar1-2", null, null, myMenu1));
myBar1.add(new WebFXMenuButton( "Bar1-3", null, null, myMenu2 ));

// 2nd horizontal menu bar
var myBar2 = new WebFXMenuBar;
myBar2.add(new WebFXMenuButton( "Bar2-1", null, null ));
myBar2.add(new WebFXMenuButton( "Bar2-2", null, null ));

// main horizontal menu
var myMainBar = new WebFXMenuBarMain;
myMainBar.add(new WebFXMenuButton( "Main1", null, null));
myMainBar.add(new WebFXMenuButton( "Main2", null, null, myBar1));
myMainBar.add(new WebFXMenuButton( "Main3", null, null, myBar2 ));

document.write(myMainBar);
myBar1.hide();
myBar2.hide();

In the source code I have created a copy of WebFXMenuBar and named it WebFXMenuBarMain. The reason I did this was because they both use different styles (from CSS). Maybe this can be solved otherwise, but I don't know how - any suggestions?

Now, when I use this menu with position defined as absolute (in CSS) everything works fine (when setting top and left values correct). The 2nd horizontal menubars are positioned on the same place - the correct way.
If switched to position defined as relative the myBar1 and myBar2 menus are displayd underneath eachother - the incorrect way for me.
I would like to use this menu in relative mode. How do I get the 2nd horizontal menu to be positioned in one place.

I hope you understand what I am trying to create. If not, excuse me for my bad explanation. I've searched the whole forum for an anwer, but didn't find it. Please help.

- Erik Smit




Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX