Jump to content

Menu JavaScript/HTML issue


krot

Recommended Posts

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>
Link to comment
Share on other sites

[!--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!
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.