Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Thursday February 8 2018 - 06:02:03

menu rollover


Poster: Roadserver
Dated: Friday July 16 2004 - 13:23:42 BST

Hello!

I have a problem

or

is the following point possible.


I like the menu at the following link:

http://www.milonic.com/menusample17.php


If you go to Milonic and then to faq (example) then i want that the picture of the animal with glasses change in a other picture (indirect rollover) is that possible?

I'm a beginner with scripts!

Who can help me!

Or send me the changed scripts


Greetz

Roadserver (Dutch)


Poster: Ruth
Dated: Friday July 16 2004 - 16:50:23 BST

To make sure we understand what you want: You mouseover the Milonic, the animal changes to one with glasses. You move the mouse down to FAQS and when you highlight FAQS you now want the animal picture with glasses next to the Milonic to change to a totally new image? If this is true, I think it might require a javascript, if it is possible to do at all.

Ruth


Poster: Roadserver
Dated: Friday July 16 2004 - 20:20:52 BST

Ruth wrote:To make sure we understand what you want: You mouseover the Milonic, the animal changes to one with glasses. You move the mouse down to FAQS and when you highlight FAQS you now want the animal picture with glasses next to the Milonic to change to a totally new image? If this is true, I think it might require a javascript, if it is possible to do at all.

Ruth


Yes thats what i want! But i'm a beginner.
My question is who can help me with this script of make it for me.
FAQ is a example, other subjects in de menu must have the same roll over with other pictures.

Thanks Ruth............maby you can help me..........


Poster: kevin3442
Dated: Friday July 16 2004 - 22:30:28 BST

Hi Roadserver,

I think I can help you. Ruth is correct... you'll need to throw in a little extra javascript. Copy the follwing function into the top of your menu_data.js file:

Code: Select all

function setParentOverImage(imageName)
{
  parentItem = getParentItemByItem(_itemRef);
  _mi[parentItem][32] = imageName;
  BDMenu(_mi[parentItem][0]);
}

This function would be called from the onfunction and offfunction properties of the menu item that you want to trigger the rollover. When you call the function, pass the name (and path if needed) of the image you want to use.

Using the example from your first post, the FAQ menu item would become like this:

Code: Select all

aI("text=FAQ;url=http://www.milonic.com/menufaq.php;onfunction=setParentOverImage('zippo_over.gif');offfunction=setParentOverImage('penfold_over.gif');");
(all on one line, with no wrapping or line breaks).

In this example, when you mouse over the "FAQ" menu item, its onfunction property calls the setParentOverImage() function, setting the parent item's overimage to 'zippo_over.gif' (the open lighter image that comes with the example). When you mouse off of the FAQ item, its offfunction property calls setParentOverImage() again, setting the parent item's overimage back to its original 'penfold_over.gif'.

Hope that helps,

Kevin


Poster: ttmobil
Dated: Saturday July 17 2004 - 1:39:13 BST

Hi!

I have the same menu with my own pics!

But I have a time problem! The mouseover effect is to slow.
The pics are 1,5 kb big.

What is the problem????


Thanks Tim


Poster: Ruth
Dated: Saturday July 17 2004 - 3:23:17 BST

Hi ttmobil,
Can you give us a url? We need to see what's happening. Also, what OS and browser are you using so we know which is slow?

Ruth


Poster: John
Dated: Saturday July 17 2004 - 5:43:02 BST

1.5K is, of course, a very small file. However, if you have a lot of images (i.e., a large menu) it could slow things down.

You might want to try preloading your images, as explained here by Kevin.


Poster: ttmobil
Dated: Saturday July 17 2004 - 9:49:21 BST

Hi!

I am using ie!

Here is the link:
http://www.ttr-friends.de/ttr-friends-dateien/index_33-dateien/head.htm

I hope, you can help me! I can gif you any information you need!
I hope my english is good enough!


by Tim


Poster: Ruth
Dated: Saturday July 17 2004 - 14:25:10 BST

Hi ttmobil,
I tested your page and it isn't slow once the images load and are in the cache. You have a lot of images and the slow first mouseover is because the image has not loaded yet. You need to go to the link John gave and use the preloadmenuimages.js file. Follow the directions that Kevin has posted at that link.

Ruth


Poster: Roadserver
Dated: Saturday July 17 2004 - 15:05:34 BST

Tanks kevin and Ruth,

It works!!


Poster: ttmobil
Dated: Saturday July 17 2004 - 16:05:37 BST

Hi Ruth!

I make the changes! But the menu is not faster!
I put the script: <script language=Javascript src="preloadmenuimages.js" type=text/javascript></script> into the head.htm after the menu call and the preloadmenuimages.js to the menu stuff!

Test it again!
What means: (i.e., after all the aI() stuff)???


Tim


Poster: Ruth
Dated: Saturday July 17 2004 - 17:20:11 BST

Hi ttmobile,
i.e. is an acronym for the latin words meaning 'that is'. So, in the context of Kevin's post it would be
(2) Load preloadmenuimages.js into your page at some location after your menus have been defined (i.e., after all the aI() stuff),
that is, after all the aI( information you have in your menu_data file has been 'read, rendered, written' by the browser,
so that the preload function knows what images it needs to get.


I don't know why it isn't faster. Which version of IE do you have and how do you connect to the internet? Also, and I don't know if this matters, but in the preloadmenuimages.js file it shows the call for the file as

Code: Select all

<script language="JavaScript1.2" type="text/javascript" src="preloadmenuimages.js"></script>
You would use your path of course, but I saw that script language=JavaScript1.2 and don't know if that needs to be in there? I'm sorry I can't be more help.

Ruth

Ruth


Poster: Roadserver
Dated: Saturday July 17 2004 - 18:27:11 BST

Did you have an example of preloading?

Link?


Poster: ttmobil
Dated: Saturday July 17 2004 - 18:38:25 BST

Hi Ruth!

I use IE6.0 and I connect the internet by DSL1500. I think that is fast enough.

Mhhh, where is the mistake????

The original menu is fast!


I dont know!

Bye Tim


Poster: Ruth
Dated: Saturday July 17 2004 - 19:43:56 BST

Roadserver,
John posted a link to Kevin's Preloadmenuimages post. Also, Milonic uses the preloadmenuimages on the site.

Tim,
The original has only 6 images, you have 28. That may contribute to it. If I think of something I will let you know.

Ruth


Poster: ttmobil
Dated: Tuesday July 20 2004 - 2:06:35 BST

Hi Ruth!

one question:

the preloader is only for a menu 5.16 or higher!
I use a 5.00 Menu!

I think this is the reason why the preloader does not work!

Can I get a free menu 5.16 on milonic??????

Thanks for your answere!

Tim


Poster: Ruth
Dated: Tuesday July 20 2004 - 4:44:53 BST

You have version 5.26. I still think the problem is the number of images, there are 28 of them totaling about 58k or so. I do remember that some of my own home made images on my site, even though they were small seemed to load slowly [not menu images, site images] I never could figure out why they did that.

Ruth


Poster: Maz
Dated: Tuesday July 20 2004 - 7:48:11 BST

Yes it sounds like you need to upgrade, the free menu comes with a milonic link, if you don't want the link in the menu then add the link in the page and the menu link will go away.

maz


Poster: John
Dated: Tuesday July 20 2004 - 15:37:56 BST

"Officially", for support, you need to be at the current version - 5.33 as this is written.

__at__ kevin3442


Poster: ttmobil
Dated: Tuesday July 20 2004 - 17:34:37 BST

__at__ kevin3442

Can you have a look at the two menu-links.

Both with the preloader, but can you check the quellcode, that everthing is ok??? I cant believe, that the menu is so slow!!!!!?????

The problem is, I am an beginner!

http://www.ttr-friends.de/ttr-friends-d ... u/head.htm

http://www.ttr-friends.de/ttr-friends-d ... n/head.htm


Thanks!


Poster: John
Dated: Tuesday July 20 2004 - 20:03:25 BST

Tim, you still need to get up to the current version before we can continue, as noted in red on http://www.milonic.com/menuvinfo.php.

Thanks. :)


Poster: ttmobil
Dated: Wednesday July 21 2004 - 5:54:29 BST

Hi John!

Here ist the link with the new version 5.33 without preloader!

http://www.ttr-friends.de/ttr-friends-d ... u/menu.htm


So, what next???


Tim


Poster: John
Dated: Wednesday July 21 2004 - 15:00:35 BST

OK, thanks.

I'm on a pretty fast connection here, so this may not be fair, but your menu came up immediately for me, as did the subs. If anything, maybe just a split-second delay the first time around, but I really wouldn't consider it negative for the majority of users.

What is your site about? I see you're still running a free unregistered license.


Poster: ttmobil
Dated: Wednesday July 21 2004 - 19:01:35 BST

Hi John!

Forget all! The problem is my firewall, norton IS!!!!!


Thank you all for your support!


Tim