ginis
Technical User
- Mar 2, 2009
- 1
Hello,
I have this javascript menu that makes drop down on mouseover. I want on this script to hide menu with mouseout effect when event occur. Is it possible?
here is the code:
function FillLowerMenu(groupTitle){
var groupNodes = document.getElementsByTagName("Group");
var node = SelectSingleNodeByAttValue(groupNodes, 'ID', groupTitle);
RemoveDiv('mainNavContainer', 'navigationContainer2');
var shadow = document.getElementById('shadow');
if(node != null && node.childNodes.length > 0)
{
var mainNavContainer = document.getElementById('mainNavContainer');
var nc2 = document.createElement("div");
nc2.id = 'navigationContainer2';
if (shadow != null)
mainNavContainer.insertBefore(nc2, shadow);
else
mainNavContainer.appendChild(nc2);
for(var i = 0; i < node.getElementsByTagName("Element").length; i++)
{
var element = node.getElementsByTagName("Element");
if (element.getAttribute('Klasa') == _AktivnaKlasa && _AktivnaKlasa != "Izvestaj")
nc2.innerHTML += "<div class='nav2'><a onClick='DrugiNivoMenijaClick(" + element.id + ", \"" + element.getAttribute("Klasa") +
"\")' href='#' class='nav2active'>" + element.getAttribute("Title") + "</a></div>";
else if(element.getAttribute("Target") == '')
nc2.innerHTML += "<div class='nav2'><a onClick='DrugiNivoMenijaClick(" + element.id + ", \"" + element.getAttribute("Klasa") +
"\")' href='#' class='nav2link'>" + element.getAttribute("Title") + "</a></div>";
if (state)
document.getElementById("div").style.visibility = 'visible';
else {
document.getElementById("element").style.visibility = 'visible';
}
else{
RemoveDiv('mainStuff', 'navigationContainer3');
RemoveDiv('mainStuff', 'navigationContainer2');
// SetBodyClass('2');
}
}
and here is the call of the function:
<a id="menu_10" href="#" class="nav1link" onmouseover="FillLowerMenu('10')">Poslovanje</a></div>
thanks in advance.
I have this javascript menu that makes drop down on mouseover. I want on this script to hide menu with mouseout effect when event occur. Is it possible?
here is the code:
function FillLowerMenu(groupTitle){
var groupNodes = document.getElementsByTagName("Group");
var node = SelectSingleNodeByAttValue(groupNodes, 'ID', groupTitle);
RemoveDiv('mainNavContainer', 'navigationContainer2');
var shadow = document.getElementById('shadow');
if(node != null && node.childNodes.length > 0)
{
var mainNavContainer = document.getElementById('mainNavContainer');
var nc2 = document.createElement("div");
nc2.id = 'navigationContainer2';
if (shadow != null)
mainNavContainer.insertBefore(nc2, shadow);
else
mainNavContainer.appendChild(nc2);
for(var i = 0; i < node.getElementsByTagName("Element").length; i++)
{
var element = node.getElementsByTagName("Element");
if (element.getAttribute('Klasa') == _AktivnaKlasa && _AktivnaKlasa != "Izvestaj")
nc2.innerHTML += "<div class='nav2'><a onClick='DrugiNivoMenijaClick(" + element.id + ", \"" + element.getAttribute("Klasa") +
"\")' href='#' class='nav2active'>" + element.getAttribute("Title") + "</a></div>";
else if(element.getAttribute("Target") == '')
nc2.innerHTML += "<div class='nav2'><a onClick='DrugiNivoMenijaClick(" + element.id + ", \"" + element.getAttribute("Klasa") +
"\")' href='#' class='nav2link'>" + element.getAttribute("Title") + "</a></div>";
if (state)
document.getElementById("div").style.visibility = 'visible';
else {
document.getElementById("element").style.visibility = 'visible';
}
else{
RemoveDiv('mainStuff', 'navigationContainer3');
RemoveDiv('mainStuff', 'navigationContainer2');
// SetBodyClass('2');
}
}
and here is the call of the function:
<a id="menu_10" href="#" class="nav1link" onmouseover="FillLowerMenu('10')">Poslovanje</a></div>
thanks in advance.