473,320 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 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 1851
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: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.