Classic Xp dhtml menu onlick launch

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Darkangel
Advanced
Advanced
Posts: 24
Joined: Sat Mar 05, 2005 12:44 am

Classic Xp dhtml menu onlick launch

Post by Darkangel »

HI everybody,

I've tried to launch the main menu with this code!

with(milonic=new menuname("Start")){
style=menuStyle;
alwaysvisible=1;
aI("text=Menu;align=center;bgimage=start.gif;itemheight=33px;itemwidth=101px;openonclick=true;showmenu=Main Menu;");}

but it doesn't work it tells me the following error:
it tells me menuStyle is undefined!!

Could you please tell me what is wrong!

Thanks in advance
Darkangel
Advanced
Advanced
Posts: 24
Joined: Sat Mar 05, 2005 12:44 am

Post by Darkangel »

Could someone help me please!
It might be a basic problem but i don't know how to solve it!

Thanks in advance
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Could you post a link please so we can see the page. I need to find out about the menuStyle problem.

Ruth
Darkangel
Advanced
Advanced
Posts: 24
Joined: Sat Mar 05, 2005 12:44 am

Post by Darkangel »

I'm currently bulding this websit but under a local server!
so i cannot!
the thing is that i just add the above code in the menu data file!!
that's all i've done!
normally it should have work because i read different post about this subject!

hope you could help me!!
i just want the main menu to appear when the user click on the button start!!
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

You'll need to post the html page code, any css and the menu_data.js file code here so I can make the page. There's no way for me to figure out what's up without seeing the page.

Use the code button above. Thanks

Ruth
Darkangel
Advanced
Advanced
Posts: 24
Joined: Sat Mar 05, 2005 12:44 am

Post by Darkangel »

Ok so let me be as precise as possible:

The thing is that it's a total new html page in which i would like to have your dhtml menu.

i'v just download the sample of your classic xp dhtml menu and install it. http://milonic.com/menusample82.php

Besides, i just modify the menu_data.js file in order to add certain modifications.

Indeed, i want the main menu to be launched not automatically but when the user will click the button start!

Here are the lines i've modified!

Code: Select all

------------------------------------
with(milonic=new menuname("Start")){
style=menuStyle;
screenposition:"bottom,left";
alwaysvisible=1;
aI("text=Menu;align=center;bgimage=start.gif;itemheight=33px;itemwidth=101px;openonclick=true;showmenu=Main Menu;");}
------------------------------------
THIS WHOLE PART FOR START HAD BEEN ADDED![/b]

Code: Select all

with(milonic=new menuname("Main Menu")){
alwaysvisible=0; [b]// MODIFICATION[/b]
screenposition="bottom,left"; top="offset=-25";  [b]// MODIFICATION[/b]
orientation="vertical";
style=submenuStyle;
aI("status=Back To Home Page;subimageposition=0                             ;text=Home;url=http://milonic.com/;");
aI("showmenu=Milonic;subimageposition=0                             ;text=Milonic;");
aI("image=clxp_hand.gif;showmenu=Partners;subimageposition=0                             ;text=Partners;");
aI("showmenu=Links;subimageposition=0                             ;text=Links;");
aI("showmenu=My Milonic;subimageposition=0                             ;text=My Milonic;");

}
my problem is that no button appear at all, the image is not loaded! the only thing which appear is an error!

" menuStyle is undefined"!

Could you please tell me what happen??
ps: there is no need to have any page as the only thing i'm trying is in a new html page!


Thanks in advance
best regards

Code: Select all

[b][/b]
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

The menu_data.js file contains no style called menuStyle, so the program cannot find that style to apply to your Start menu. If you are taking this from a different existing menu, then either copy and paste the menuStyle to the xp menu_data.js file or rename the style for that start menu.

Ruth
Darkangel
Advanced
Advanced
Posts: 24
Joined: Sat Mar 05, 2005 12:44 am

Post by Darkangel »

humh ok!

so let's see the problem in an other way!

i just want to launch the main menu through a simple link on my html page!

isn't there a way to do it in a simple way such a <a onclik="showmenu...
i don't know

hope you could tell me the answer!
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

It's fine the way it is, just change

Code: Select all

with(milonic=new menuname("Start")){ 
style=menuStyle; 
to

Code: Select all

with(milonic=new menuname("Start")){ 
style=submenuStyle; 
Since you have coded the aI string with the bgimage= it will take that as the bgimage.

I don't know how to make an html link to show a Milonic menu.

When you use a sample, any sample, you can change the names of styles, add styles, delete styles if it has more than one but you are going to have all the menus use the same style. So, you could even rename the subMenuStyle to menuStyle and just make sure you rename all the style= in all the menus.

Ruth
Darkangel
Advanced
Advanced
Posts: 24
Joined: Sat Mar 05, 2005 12:44 am

Post by Darkangel »

it's fine ! it works now!

however just another simple question!

on this line: aI("text=menu;bgimage=start.gif

how could we change the color or the word menu in white for example??
Darkangel
Advanced
Advanced
Posts: 24
Joined: Sat Mar 05, 2005 12:44 am

Post by Darkangel »

Besides,

i still need to solve the color problem but another also!!

Code: Select all

alwaysvisible=1;
screenposition="bottom,left"; top="offset=-1";
aI("text=Démarrer;bgimage=start.gif;itemheight=25px;itemwidth=100px;openonclick=true;showmenu=Main Menu;");} 
indeed there is a problem with the itemheight!
following the size of the window, the size of the image had to follow!
meaning that i should use % instead of px!
but it doesn't work!!
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

I'm very sorry but I am not a code person nor a programmer. I can't just read words and say, oh this is what the person means. I need to have a page or a more indepth explanation. Do you mean if the browser resolution changes you want the item height to get bigger than the rest of the page now? You have it set so the item is always 33px, it will be 33px no matter what the resolution of the browser, of course it will look smaller at higher resolutions, but then the whole page looks smaller at higher resolutions. If you mean you don't want the text size to change the only way you can do that is to use an image, though just like everything else on the page an image will 'look' smaller at higher resolutions. If you could post some screenshots or something showing the differences and explain what you want to happen I might be able to figure it out.


As to changing the color of the word text, you can also use many of the various properties in the aI to change one item and make it different from the style that is applied, like the offcolor and oncolor which refers to the color of the text when the mouse is not on it or when it is on it. So, you want the text to be white for that item you would put the item like this

Code: Select all

aI("text=Menu;align=center;offcolor=#ffffff;oncolor=#ffffff;bgimage=start.gif;itemheight=33px;itemwidth=101px;openonclick=true;showmenu=Main Menu;");} 
You would make the offcolor and oncolor whatever you want them to be they do NOT have to be the same.


In order to better understand about the menu I suggest you take a look at this forum

There are three sections which talk about styling the menu and some other posts with basic information.

Below my name are also links to properties, style properties which go in the

Code: Select all

with(menuStyle=new mm_style()){  
or whatever the style name is, menu properties which go in the section

Code: Select all

with(milonic=new menuname("Main Menu")){
alwaysvisible=1;style=menuStyle;
and item properties which go into any of the aI strings.

Ruth
Darkangel
Advanced
Advanced
Posts: 24
Joined: Sat Mar 05, 2005 12:44 am

Post by Darkangel »

Thnaks for this long explanation!
I understand what you mean and of course my image will look smaller if the resolution is higher!

what i just want to say is that if a person with a normal resolution do not maxmize the active ie window for isntance and reduce it slightly the image is still at 33px and is not reduced!


Concretely the only thing i have in my page is an image on the backside:
<div id="fond" style="position:absolute; width:100%; height:4%; z-index:1; bottom: 0px; left: 0; background-image : url(Images/Bureau/fond.gif); background-repeat : repeat-x;">

you can here see that the height is fixed at 4% of the screen height:
what i need is that the start button of my menu_data.js file should be the same
meaning that i need to modify this part!

Code: Select all

with(milonic=new menuname("Start")){
style=menuStyle;
alwaysvisible=1;
screenposition="bottom,left"; top="offset=-1";
aI("text=Démarrer;bgimage=start.gif;itemheight=25px;itemwidth=100px;openonclick=true;showmenu=Main Menu;");} 
and more precisely the itemheight. Here the itemheights is fixed at 25px but i want ti to be fiexed at 4%... i've tried to just put itemheight=4% but it doesn"t work!
Darkangel
Advanced
Advanced
Posts: 24
Joined: Sat Mar 05, 2005 12:44 am

Post by Darkangel »

forget what i've said it seems to work now..
thanks for all
Post Reply