472,982 Members | 2,293 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,982 software developers and data experts.

Menu hover using Javascript

Hello,

I have a menu in my web page, hovering on which it displays the
contents.
Its been constructed using <uland <litags.

The problem is that the menu appears on page load which i dont it to
happen. I want the menu to be appeared only if I hover the mouse on it.

Here is the code i have written :

<script type="text/javascript" language="JavaScript1.2">
function menuHover(id)
{
var d = document.getElementById(id);
if (document.getElementById('menu1'))
{

document.getElementById('menu1').style.display='no ne';
}
if (d)
{
d.style.display='block';
}
}
</script>

<dt onmouseover="menuHover('menu1');" onmouseout="menuHover('');">
<img src="/images/images.gif" id="image_view" runat="server">
</dt>
<dd id="menu1" onmouseover="menuHover('menu1');"
onmouseout="menuHover('');">
<ul>
<liContent 1 </li>
<liContent 1 </li>
</ul>
</dd>

Can anyone help me out this? Its urgent !!

Jul 6 '06 #1
1 1844
You can disable the visibility of a block by setting its css properties.

<span style="display:none; visibility: hidden;">Hidden layer</span>
Vani Kulkarni wrote:
Hello,

I have a menu in my web page, hovering on which it displays the
contents.
Its been constructed using <uland <litags.

The problem is that the menu appears on page load which i dont it to
happen. I want the menu to be appeared only if I hover the mouse on it.

Here is the code i have written :

<script type="text/javascript" language="JavaScript1.2">
function menuHover(id)
{
var d = document.getElementById(id);
if (document.getElementById('menu1'))
{

document.getElementById('menu1').style.display='no ne';
}
if (d)
{
d.style.display='block';
}
}
</script>

<dt onmouseover="menuHover('menu1');" onmouseout="menuHover('');">
<img src="/images/images.gif" id="image_view" runat="server">
</dt>
<dd id="menu1" onmouseover="menuHover('menu1');"
onmouseout="menuHover('');">
<ul>
<liContent 1 </li>
<liContent 1 </li>
</ul>
</dd>

Can anyone help me out this? Its urgent !!
Jul 6 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: unurban | last post by:
I have a javascript menu based off of unordered lists that only shows the subnav links when you click on the main nav links. is there a way to keep any subnav items open after you click on a link...
2
by: hemanth.singamsetty | last post by:
Hello there, I've a drop down menu (created using CSS & Javascript -- see code below). My problem is, whenever I click a link on the menu the new page replaces the current page (and the menu...
2
by: Ravi Joshi | last post by:
The menu on my site works fine in IE6 and Firefox. In IE7, there is a problem with the menu: when you mouse over the various main catagories, the sub-catagories all appear to the right as they...
0
by: mjohnson0321 | last post by:
I am trying to incorporate a CSS drop-down menu into a site (suckerfish menu). The menu gets lost behind the content below it, but only on one of the drop downs (News). The error occurs on all of...
2
by: namratha247 | last post by:
Hi, Can anybody please help me with this problem. In my application, I'm using Menus. and the CSS for the menu is as given below ccMenu.css /* Root = Horizontal, Secondary = Vertical */...
3
by: tceramesh | last post by:
Hi Friends, I Created one drop down menu by using CSS. It is perfect in Firefox but in IE it creates some problem. in the header section the drop down menu appear,, below that...
0
by: rahullko05 | last post by:
i have designed a menu list program in which i'm facing a problem where the last li item (white crappie) shifts down when i hover mouse pointer to just above li item (ozrack bazz) of white crappie...
2
by: dharmbhav | last post by:
Hello all, I am trying to develop a roll-over menu effect on a page. It works fine with all other browsers except IE6. Can some one please help me? HTML: <div class="menu-item-wrap">...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.