menu rollover
-
- Advanced
- Posts: 17
- Joined: Thu Jul 15, 2004 6:01 pm
menu rollover
Hello!
I have a problem
or
is the following point possible.
I like the menu at the following link:
http://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)
I have a problem
or
is the following point possible.
I like the menu at the following link:
http://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)
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
Ruth
-
- Advanced
- Posts: 17
- Joined: Thu Jul 15, 2004 6:01 pm
Yes thats what i want! But i'm a beginner.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
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..........
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:
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:(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
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]);
}
Using the example from your first post, the FAQ menu item would become like this:
Code: Select all
aI("text=FAQ;url=http://milonic.com/menufaq.php;onfunction=setParentOverImage('zippo_over.gif');offfunction=setParentOverImage('penfold_over.gif');");
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
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.
You might want to try preloading your images, as explained here by Kevin.
John
Hi!
I am using ie!
Here is the link:
http://www.ttr-friends.de/ttr-friends-d ... n/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
I am using ie!
Here is the link:
http://www.ttr-friends.de/ttr-friends-d ... n/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
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
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
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
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
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 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
i.e. is an acronym for the latin words meaning 'that is'. So, in the context of Kevin's post it would be
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(2) Load preloadmenuimages.js into your page at some location after your menus have been defined (i.e., after all the aI() stuff),so that the preload function knows what images it needs to get.that is, after all the aI( information you have in your menu_data file has been 'read, rendered, written' by the browser,
Code: Select all
<script language="JavaScript1.2" type="text/javascript" src="preloadmenuimages.js"></script>
Ruth
Ruth
-
- Advanced
- Posts: 17
- Joined: Thu Jul 15, 2004 6:01 pm
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
Ruth
@ kevin3442
@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!
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!