Link to home
Start Free TrialLog in
Avatar of ris
ris

asked on

transparent pop-up menu system

I want to make a transparent pop-up menu, preferably in JavaScript.  By "pop-up menu" I mean a menu that pops-up onMouseOver (or on-click) of an image.  By "transparent" I mean that the menu that pops up is composed of transparent GIFs so that A) the items in the menu are cool looking non-square graphics and B) you can see around the non-square edges to the static web page contents underneath it.

Oddly enough, I have never seen such a pop-up meny on any website I have ever visited, though I must have seen hundreds of popup menus on websites.  However, I have seen enough separate accomplishments in DHTML to believe it must be possible.  In fact, the two most common DHTML things I have seen are 1) (opaque) pop-up menus and 2) transparent floating images that can be moved around the screen.  It seems to me that it must be possible to combine these DHTML concepts to create a pop-up menu composed of transparent images.

I'm very familiar with javascript and I would like to use that to implement this idea.  I saw a vague reference in another topic on EE that refered to a site that did something they called transparent popup menus using flash.  Unfortunately when I followed their link to the site that supposedly did this, I was unable to find any popup menus, so I assume that the site changes since the posting of that message and now.  I don't want to use flash because I have a philisophical problem with requiring users to download a plugin: I won't do it!  Also, I am developing this website for a person who has absolutely no knowledge of programming or web scripting and I feel more comfortable that I can make it maintainable for this person if I use javascript rather than flash (which I've never used before due to my no plugins philisophy).

ANYWAY, I have a few examples of DHTML popup menus in javascript to start from.  What I'm looking for is either complete code to an existing transparent pop-up menu system that I can simply plug-in and use (which would be ideal) or some advice on what basic appropach to take when developing this on my own.  Does anyone disagree with me that this is even possible?  Can anyone suggest a basic starting point for me to work on making the background of the pop-up menu transparent?  Is there a way to make the layer's background transparent using CSS style sheets?  Or should I use floating images that I substitute between the real image and a fully transparent image in order to show and hide the menus?  Or should I use images that I push off the screen when I hide them and bring back into view when I show them again?  What is going to be the most effective method, and what method do I have the most chance of making compatible between both netscape and IE?
ASKER CERTIFIED SOLUTION
Avatar of webwoman
webwoman

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ris
ris

ASKER

OK, that sounds pretty good.  I figured I might as well award you the points since that's about all I was looking for.

I'd also like to do roll-over highlighting on the menu items.  It's not very effective to do rollovers on an image map, though I can imagine that you could do it by swapping out the entire image map... Is there a way to define a single transparent layer that contains several transparent images?  Or do I need to create a separate layer for each menu item (each of which would be a single transparent image)?
Sure. Just create a rollover, contained in a table, the same way you would any other rollover. Use whatever you normally use (I use Fireworks, but ImageReady works too). You can have the javascript to swap them on the main page, or as an external .js file linked in the head tags, like normal. You put the table in the div, position that, show/hide it. While it's visible the mouseovers work, when you hide it they're gone. Basically you put the script on the main part of the page, and just put the table with the rollovers in the div.

Forms don't work well unless you keep them together on the div, but mouseovers, imagemaps, etc., work fine.
Avatar of ris

ASKER

Thanks for the info!