Jump to content

Sub Menus are shown by default when


sudhakarReddy

Recommended Posts

Hi Guys,I ahd a submenu. evrything is working fine. But there is small problem.Actually the submenus are shown OnMouseOver event only. They r showing. But, the problem is,when i open my html page in my browser, automatically the submenus are also showing for the first time only. After that it is working fine. why it is showing.Here is my Code// JavaScript Documentfunction showmenu(elmnt){document.getElementById(elmnt).style.visibility="visible";}function hidemenu(elmnt){document.getElementById(elmnt).style.visibility="hidden"}Plz help me.Sudha.

Link to comment
Share on other sites

// JavaScript Documentfunction showmenu(elmnt){    document.getElementById(elmnt).style.visibility="visible";}function hidemenu(elmnt){    document.getElementById(elmnt).style.visibility="hidden"}

What do you initially set your element "elmnt" to in your HTML code? Try:
<div id="elmnt" style="visibility:hidden">

WG

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...