/    Sign up×
Community /Pin to ProfileBookmark

I have some drop down menus on my homepage, [url]www.fgispirit.org/index-newest.htm[/url], but after you mouse over them the background color changes, but when you move the mouse off of the buttons and back on again they do not change anymore, this is probably kind of confusing, please go to the site and see for yourself. Thanks for any help you can give me!

to post a comment
HTML

1 Comments(s)

Copy linkTweet thisAlerts:
@PeOfEoDec 17.2004 — Well your menu code is very very dirty. Your probelm is you are not setting the color back in onmouseout. Let me get some of my menu code here:

This is the jsfile. It is ddmenu.js
<i>
</i>function showmenu(elmnt)
{
document.getElementById(elmnt).style.visibility = "visible";
}
function hidemenu(elmnt)
{
document.getElementById(elmnt).style.visibility = "hidden";
}


Then when the mouse goes over the element to show the menu you say something like:
<i>
</i>&lt;div id="ddm" onmouseover="showmenu('lstddm');" onmouseout="hidemenu('lstddm'); "&gt;
&lt;a href="backupmenu.aspx"&gt;Backup menu for those with no java script&lt;/a&gt;&lt;/br&gt;
&lt;div class="tblmenu" id="lstddm"&gt;
&lt;div&gt;
&lt;a href="someplace1"&gt;someplace&lt;/a&gt;&lt;br&gt;
&lt;a href="somplace2"&gt;someplace&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;

That is all there is to my drop down menu. To change the colors do something like this.
<i>
</i>&lt;div id="ddm" onmouseover="showmenu('lstddm');style.backgroundColor='#84C1DF'" onmouseout="hidemenu('lstddm'); style.backgroundColor='#00000'"&gt;
&lt;a href="backupmenu.aspx"&gt;Backup menu for those with no java script&lt;/a&gt;&lt;/br&gt;
&lt;div class="tblmenu" id="lstddm"&gt;
&lt;div&gt;
&lt;a href="someplace1"&gt;someplace&lt;/a&gt;&lt;br&gt;
&lt;a href="somplace2"&gt;someplace&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
Where the background is naturally black.
×

Success!

Help @FGI_Webmaster spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...