HighDots Forums  

Re: Not working in Mozilla

alt.html.dhtml alt.html.dhtml


Discuss Re: Not working in Mozilla in the alt.html.dhtml forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
X l e c t r i c
 
Posts: n/a

Default Re: Not working in Mozilla - 09-14-2005 , 12:03 PM






Delta wrote:

"I have a HTML/DHTML horizontal menu in IE6 it works fine in Mozilla it
is very bad

what can I use and what I can't ?

code is bellow

thank you for any help"

Hi Delta,

I won't go over all your code with a fine tooth comb, but what really
stood out regarding your functions is that I don't think Mozilla
recognizes document.all.

Instead try using document.getElementById or a conditional for both.
Although it might not make a difference, I would also stay away from
naming the variable id.

It's not the most efficient, but maybe something like this will work:

<script type="text/javascript">
function showmenu(id_s)
{
if (document.getElementById)
{
document.getElementById(id_s).style.visibility = "visible";
}
else
{
document.all(id_s).style.visibility = "visible";
}
}
function hidemenu(id_h)
{
if (document.getElementById)
{
document.getElementById(id_h).style.visibility = "hidden";
}
else
{
document.all(id_h).style.visibility = "hidden";
}
}
</script>


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.