Jump to content


Photo

Menu JavaScript/HTML issue


  • Please log in to reply
2 replies to this topic

#1 krot

krot
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 23 May 2006 - 06:28 AM

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>

#2 nogray

nogray
  • Members
  • PipPipPip
  • Advanced Member
  • 930 posts
  • LocationSan Francisco CA

Posted 25 May 2006 - 12:58 AM

instead on using the image, use a background, than change the background in the javascript.

NoGray.com


#3 krot

krot
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 25 May 2006 - 03:47 AM

[!--quoteo(post=376856:date=May 24 2006, 08:58 PM:name=nogray)--][div class=\'quotetop\']QUOTE(nogray @ May 24 2006, 08:58 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
instead on using the image, use a background, than change the background in the javascript.
[/quote]

Thanks! Done!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users