krot Posted May 23, 2006 Share Posted May 23, 2006 Hi:I want to have menu buttons that use onousedown and onmouseout, without the gif files showing the menu word. I want to add the word dynamically, through text somewhere. When I try this through href, the word appears on the right of the menu gif file (the word 'Clinic' in this example). How do I get the menu name on top of the gif file and still get onmouseout and onmousedown working? I don't want to add the name to the graphic. Much obliged for any thoughts on the issue.Here's the code:<body><script language="javascript"><!-- function hiLite(imgDocID,imgObjName) { document.images[imgDocID].src = imgObjName; } function hiLiteOff(imgDocID,imgObjName) { document.images[imgDocID].src = imgObjName; }--></SCRIPT><A href="/test_home.html" onmousedown="hiLite('b2','/buttons/ButOnBeigeBlank.gif')" onmouseout="hiLiteOff('b2','/lifesalad/nbaascc/buttons/beige/ButOffBeigeBlank.gif')"><IMG src="/buttons/ButOffBeigeBlank.gif" name="b2" width="88" height="17" border="0" alt="Clinic">Clinic</A></body> Quote Link to comment https://forums.phpfreaks.com/topic/10239-menu-javascripthtml-issue/ Share on other sites More sharing options...
nogray Posted May 25, 2006 Share Posted May 25, 2006 instead on using the image, use a background, than change the background in the javascript. Quote Link to comment https://forums.phpfreaks.com/topic/10239-menu-javascripthtml-issue/#findComment-38750 Share on other sites More sharing options...
krot Posted May 25, 2006 Author Share Posted May 25, 2006 [!--quoteo(post=376856:date=May 24 2006, 08:58 PM:name=nogray)--][div class=\'quotetop\']QUOTE(nogray @ May 24 2006, 08:58 PM) [snapback]376856[/snapback][/div][div class=\'quotemain\'][!--quotec--]instead on using the image, use a background, than change the background in the javascript.[/quote]Thanks! Done! Quote Link to comment https://forums.phpfreaks.com/topic/10239-menu-javascripthtml-issue/#findComment-38776 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.