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: Archived Topics for the old Version 3.0 JavaScript Menu
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:07

how to make an image appear in the mouseover


Poster: Bill
Dated: Friday October 3 2003 - 1:09:02 BST

Here is the code I have for my menu item:

addmenu(menu=["Coming Conferences",,,160,1,,style3,0,"left","gradientwipe(size=1.00, wipestyle=0, motion=Forward,

duration=0.3);Shadow(color='#777777', Direction=135, Strength=5)",0,,,,,,,,,,,
,"<img border=0 align=middle scr=Image2.gif>9th International Fragile X Conference, June 23-27, 2004 at the Renaissance Hotel in

Washington, DC","http://www.marriott.com/DPP/propertyPage.asp?marshacode=WASRB&EPNAVCEC=InProcess",,"",1

])

The Image2.gif doesn't show up...just a image square like it can't find the graphic. The image is in the same dir as the menus. See the image for the menu item itself called arrowrtgold.gif? That one shows in the menu bar. I'm just trying to get the image to show when I do a mouseover. The text I have shows up.

Any ideas what I'm missing?


Poster: kevin3442
Dated: Friday October 3 2003 - 1:26:03 BST

Hi Bill,

Quote:
like it can't find the graphic. The image is in the same dir as the menus.


Two things:

(1) Since the script is loaded into the html file, and acts from there, the image path is relative to the location of the html file, not the menu script files. I.e., without specifying a path to the image, the page is going to look in the same directory that it (the html file) came from.

(2) [gentle prod] Just for future reference, you're using version 3 of the menu, but this forum is for version 5. There is a version 3 forum you can use for subsequent version 3 questions. Also, if you're just starting out, why not consider switching to the latest greatest version?

Hope that helps,

Kevin


Poster: Bill
Dated: Friday October 3 2003 - 1:54:45 BST

The image is in the same directory. In fact I replaced the call to the Image2 with the arrowrtgold and it failed too. Something about that area of the menus not allowing an image to appear.
Sorry I got into the wrong area of the forumns. I've been using these menus for a long time now and I can't find Andys example of the cars for menu version 3 like he has for version 5. I want to convert over to v5 but I have a lot of time invested in my site and am affraid I'd have to do it all over again.
Go see: http://www.fragilex.org and you'll see.


Poster: kevin3442
Dated: Friday October 3 2003 - 2:49:42 BST

Hi Bill,

I had a look at your site and menu4_array.js. Don't know if this was in there before (it didn't show up in the exampe code of your initial post), but your code actually has a / in front of the image filename, like so:
Code:
,"<img scr=/Image2.gif>9th International

Try removing the slash, like so:
Code:
,"<img scr=Image2.gif>9th International

Also, if you want to have a second image, to get a mouseover effect on that image, you'll need to use the swapimage parameter, like this:
Code:
,"<img scr=Image2.gif>9th International Fragile X Conference, June 23-27, 2004 at the Renaissance Hotel in Washington, DC ","http://www.marriott.com/DPP/propertyPage.asp?marshacode=WASRB&EPNAVCEC=InProcess swapimage=imagename.gif",,"",1

Hope that helps,

Kevin

Found the problem .... I had scr instead of src in the code


Poster: Bill
Dated: Friday October 3 2003 - 3:04:45 BST

I fixed the finger check in the code and it worked.....Thanks for the rollover tip.

I would like to progress to the version 5 but now that you have seen the site and some of the code, what do you think my chances of the convertor making in good or turning it into a mess.


Poster: Hergio
Dated: Friday October 3 2003 - 14:00:03 BST

Tough to say, the converter had some growing pains when it first came out. There were times it worked great on peoples code and others the simplest thing would throw it off. I think its been tweaked alittle. Your best bet would be to run it through the menu, why not. Get the new code, throw it into a test page and run it, see how it goes! Good luck! ;)


Poster: John
Dated: Friday October 3 2003 - 15:22:22 BST

One thing I noticed is his img tags all contain...
Code:
,"<img scr...

I'm a little confused why it's working, since that should be...
Code:
,"<img src...


Poster: kevin3442
Dated: Friday October 3 2003 - 17:03:22 BST

Interesting indeed... didn't even see that. So why does it work at all? Darn... now I'm going to have to look into that or it's going to bug me. Thanks a lot John.


Poster: Andy
Dated: Friday October 3 2003 - 19:07:54 BST

Let us know if you find out Kevin.

I'll put it with all the other weird things that have happened lately :?

Cheers
Andy


Poster: John
Dated: Saturday October 4 2003 - 1:17:55 BST

You know I'm always lookin' out for 'our gang', Kevin... ;)