P
Pawel_Iks
I have following xhtml doc with js code:
====================================================================
<html>
<head>
<style>
#menu1
{ display: block;text-decoration:none;}
#menu1:hover {color:red;}
#main_menu {border: 1px solid black;width:140px;height:
100px;display:none;}
</style>
<script type="text/javascript">
function rozwin() {
obj1=document.getElementById("main_menu");
obj1.style.display= "block";
}
function zwin() {
obj1=document.getElementById("main_menu");
obj1.style.display= "none";
}
</script>
</head>
<body>
<a id="menu1">Menu 1</a>
<div id="main_menu">
<ul id="submenu1">
<li >pozycja 1</li>
<li >pozycja 2</li>
<li>pozycja 2</li>
<li>pozycja 2</li>
</ul>
</div>
<script type="text/javascript">
document.getElementById("menu1").onmouseover=rozwin;
document.getElementById("main_menu").onmouseout=zwin;
</script>
</body>
</html>
====================================================================
and there is event: onmouseout event for div element with
id="main_menu", however, when the cursor is in the area of this div
the menu dissapear mysteriously ... I want to know why and where is
the problem?
====================================================================
<html>
<head>
<style>
#menu1
{ display: block;text-decoration:none;}
#menu1:hover {color:red;}
#main_menu {border: 1px solid black;width:140px;height:
100px;display:none;}
</style>
<script type="text/javascript">
function rozwin() {
obj1=document.getElementById("main_menu");
obj1.style.display= "block";
}
function zwin() {
obj1=document.getElementById("main_menu");
obj1.style.display= "none";
}
</script>
</head>
<body>
<a id="menu1">Menu 1</a>
<div id="main_menu">
<ul id="submenu1">
<li >pozycja 1</li>
<li >pozycja 2</li>
<li>pozycja 2</li>
<li>pozycja 2</li>
</ul>
</div>
<script type="text/javascript">
document.getElementById("menu1").onmouseover=rozwin;
document.getElementById("main_menu").onmouseout=zwin;
</script>
</body>
</html>
====================================================================
and there is event: onmouseout event for div element with
id="main_menu", however, when the cursor is in the area of this div
the menu dissapear mysteriously ... I want to know why and where is
the problem?