menu question

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
jamserra
Advanced
Advanced
Posts: 10
Joined: Thu Mar 30, 2006 6:05 pm

menu question

Post by jamserra »

If I have the line:
with(milonic=new menuname("Reports"))
is there a way to make it so a user can click on the Reports menu item and it will go to a certain URL? Right now, if a user clicks on Reports, it leaves the word highlighted.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

with(milonic=new menuname("Reports"))

is not a menu item. That is the name of the menu. If it is a submenu, it will have a style listed, and then a lot of menu items. If it is a main menu it will have top, left, alwaysvisible, style and so on listed with it, then the aI strings.

To get an item to go to a url when clicked you need to code the url in the aI string, for example:

aI("text=Home;url=http://milonic.com/;");

If you post a url and tells us exactly what you want we can better help you.


Ruth
jamserra
Advanced
Advanced
Posts: 10
Joined: Thu Mar 30, 2006 6:05 pm

Post by jamserra »

Here is more of the code:

Code: Select all

with(milonic=new menuname("Reports")){
style=menuVerticalStyle;
aI("showmenu=League;text=League;");
aI("showmenu=Franchise;text=Franchise;");
aI("showmenu=Player;text=Player;");
aI("showmenu=Transactions;text=Transactions;");
aI("showmenu=News;text=News;");
aI("showmenu=NFL;text=NFL;");
}
For the menu, "Reports" is displayed, and when the mouse is over "Reports", the submenu displays. Is there a way to allow a mouse click on "Reports" to go to a url?
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hello,

You can use both things in one item. So if you want an item to open a submenu you'd use the showmenu. If you want it to go to a url when clicked you'd use the url= and if you want both, then you'd use both

aI("text=Reports;showmenu=reports;url=whatever;");

However, if it's showing a submenu some people might not think to click it. You might prefer to put an item in that reports submenu that they can click to go to the reports page like the following.

Code: Select all

with(milonic=new menuname("Reports")){ 
style=menuVerticalStyle;
aI("text=Go to Main Reports;url=whatever;"); 
aI("showmenu=League;text=League;"); 
aI("showmenu=Franchise;text=Franchise;"); 
aI("showmenu=Player;text=Player;"); 
aI("showmenu=Transactions;text=Transactions;"); 
aI("showmenu=News;text=News;"); 
aI("showmenu=NFL;text=NFL;"); 
} 
Ruth
jamserra
Advanced
Advanced
Posts: 10
Joined: Thu Mar 30, 2006 6:05 pm

Post by jamserra »

One more followup question: after the user clicks on the top menu (i.e. "Reports") and it jumps to a url, is there a way to have the top menu (i.e. "Reports") be highlighted or bolded so the user knows what menu he is on?
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Yes. You really need to look at the docs, or you can take a look at the Menu Quick Reference Guides on the main site page. Go to DTHML Menu on the menu, then look toward the bottom and you'll see the guides. There are style, menu and item property guides. They show which properties are available in which area with a simple explanation of what they are and how to code them.

Such things as pageX, where x is color, or bgcolor or image etc. are for highlighting the menu to show where people are in the menu.

I think the links are below my name for those things, and also a few others for some help.

Ruth
Post Reply