R
ruca
Hi,
I have a XP collapsible menu that works fine in IE, but in Firefox don't
collapses. I know both browsers interprets different thigs.
I post the code that I have to allow collapse and expand my menu.
Can anyone give me some help in what I have to change to working with
firefox or mozila ????
function ControlMenu()
{
cnt = 1;
objMenu = this.parentNode.childNodes(1); /* memorize the Menulist has been
clicked */
/* Get the arrow that belongs to the clicked menu */
/* starting with <div> then <table> then <tbody> then <tr> then <td> and
the last one is */
/* what we need: <img> */
var objArrow =
this.childNodes(0).childNodes(0).childNodes(0).childNodes(1).childNodes(0);
if (objMenu.style.display == "none")
{
objArrow.src = imageUp.src; /* change to the Down Arrow */
ShowMenu();
}
else
{
objArrow.src = imageDown.src; /* change to the Up Arrow */
HideMenu();
}
//buttonOn();
}
function ShowMenu()
{
var objList = objMenu.childNodes(0); // get the Linkslist of the Menulist
if (cnt < 10)
{
// display the Menulist
objMenu.style.display = "block";
// increase the tranparency of the Menulist
objMenu.filters["alpha"].opacity = objMenu.filters["alpha"].opacity + 10;
// loop through the Menu collection to find the position of the clicked
Menu
// to get the actual height of the menu list and then increase the height
of the Menulist
for (var i = 0; i < objSpanCollection.length; i++)
if (objMenu.parentNode == objSpanCollection)
objMenu.style.height = objMenu.clientHeight +
(menuHeightCollection/10);
cnt++;
// do this function again after 30 miliseconds until the actual
Menulist's height is returned
setTimeout("ShowMenu()",30)
}
// display the Menulist if the it's actual height is returned
if (cnt >= 10)
{
for (var i = 0; i < objSpanCollection.length; i++)
if (objMenu.parentNode == objSpanCollection)
objMenu.style.height = menuHeightCollection;
objList.style.display = "block";
}
}
function HideMenu()
{
var objList = objMenu.childNodes(0); // get the Linkslist of the Menulist
if (cnt < 10)
{
objMenu.filters["alpha"].opacity = objMenu.filters["alpha"].opacity - 10;
for (var i = 0; i < objSpanCollection.length; i++)
if (objMenu.parentNode == objSpanCollection)
if (objMenu.clientHeight > menuHeightCollection/10)
objMenu.style.height = objMenu.clientHeight -
(menuHeightCollection/10);
objList.style.display = "none";
cnt++;
setTimeout("HideMenu()",30)
}
if (cnt >= 10)
{
objMenu.style.height = 0;
objMenu.style.display = "none";
}
}
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope can help (if I try to help)
ruca
I have a XP collapsible menu that works fine in IE, but in Firefox don't
collapses. I know both browsers interprets different thigs.
I post the code that I have to allow collapse and expand my menu.
Can anyone give me some help in what I have to change to working with
firefox or mozila ????
function ControlMenu()
{
cnt = 1;
objMenu = this.parentNode.childNodes(1); /* memorize the Menulist has been
clicked */
/* Get the arrow that belongs to the clicked menu */
/* starting with <div> then <table> then <tbody> then <tr> then <td> and
the last one is */
/* what we need: <img> */
var objArrow =
this.childNodes(0).childNodes(0).childNodes(0).childNodes(1).childNodes(0);
if (objMenu.style.display == "none")
{
objArrow.src = imageUp.src; /* change to the Down Arrow */
ShowMenu();
}
else
{
objArrow.src = imageDown.src; /* change to the Up Arrow */
HideMenu();
}
//buttonOn();
}
function ShowMenu()
{
var objList = objMenu.childNodes(0); // get the Linkslist of the Menulist
if (cnt < 10)
{
// display the Menulist
objMenu.style.display = "block";
// increase the tranparency of the Menulist
objMenu.filters["alpha"].opacity = objMenu.filters["alpha"].opacity + 10;
// loop through the Menu collection to find the position of the clicked
Menu
// to get the actual height of the menu list and then increase the height
of the Menulist
for (var i = 0; i < objSpanCollection.length; i++)
if (objMenu.parentNode == objSpanCollection)
objMenu.style.height = objMenu.clientHeight +
(menuHeightCollection/10);
cnt++;
// do this function again after 30 miliseconds until the actual
Menulist's height is returned
setTimeout("ShowMenu()",30)
}
// display the Menulist if the it's actual height is returned
if (cnt >= 10)
{
for (var i = 0; i < objSpanCollection.length; i++)
if (objMenu.parentNode == objSpanCollection)
objMenu.style.height = menuHeightCollection;
objList.style.display = "block";
}
}
function HideMenu()
{
var objList = objMenu.childNodes(0); // get the Linkslist of the Menulist
if (cnt < 10)
{
objMenu.filters["alpha"].opacity = objMenu.filters["alpha"].opacity - 10;
for (var i = 0; i < objSpanCollection.length; i++)
if (objMenu.parentNode == objSpanCollection)
if (objMenu.clientHeight > menuHeightCollection/10)
objMenu.style.height = objMenu.clientHeight -
(menuHeightCollection/10);
objList.style.display = "none";
cnt++;
setTimeout("HideMenu()",30)
}
if (cnt >= 10)
{
objMenu.style.height = 0;
objMenu.style.display = "none";
}
}
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope can help (if I try to help)
ruca