Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HDI make an image that changes AND shows a popup menu on rollover?

Status
Not open for further replies.

Webmaster2000

IS-IT--Management
Oct 11, 2000
1
GB
I am designing a website and on my navicagation frame I have a picture. What I would like, is a way that it changes image when the mouse goes over it AND displays a popup menu at the same time? If ne1 could send me either some adjustable code or a link to a shareware program that will generate the code for me that would be great.|-0 [sig][/sig]
 
You need then to have something like this:
<script language=&quot;JavaScript&quot;>
var isOffMenu=true;
var isOffButton=true;

function showPopup(elemID){
document.all[elemID].style.visibility=&quot;visible&quot;

}
function hideMenu(elemID){
if(isOffMenu && isOffButton)
document.all[elemID].style.visibility=&quot;hidden&quot;;
else{}
}

</script>
Then add to your image's onMouseover=&quot;;isOffButton=false
showPopup('menuid')&quot; and to its onMouseOut=&quot;;isOffButton=true;hideMenu('menuid')&quot;

for the menu make sure it overlaps slightly so that there is no gap when rolling between the button and the menu, otherwise it will disappear before you get there!1 pixel is enough overlap!
and add to menu:

onMouseOver=&quot;;isOffmenu=false&quot; and onMouseOut=&quot;;isOffmenu=true;hideMenu(menuid)&quot;

This will only work in IE by the way. elemID is the ID of your menu element, and it should be [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top