www.webdeveloper.com
Results 1 to 3 of 3

Thread: Menu-problem in FireFox

  1. #1
    Join Date
    Jun 2005
    Posts
    43

    Talking Menu-problem in FireFox

    Hi there.

    I've made my own horizontal menu and it's working great on a PC in IE. FF, NS, and it works great on a MAC in Safari.

    But the problem is, it won't work in FireFox. It won't show the submenu's.

    I know this is maybe not the best code to do this kind of menu, but I'm trying to learn all of this and I'm happy I've got this far.

    If anyone can tell me whta I'm doing wrong here or how I can improve my code, please....



    Code:
    <!--
    var timerID = null;
    var what = "";
    
    function drop(what_name) {
    
    var what = document.getElementById(what_name);
    
    
    subBureau.style.display='none'
    subOpdrachtgever.style.display='none'
    
    if (what.style.display=='none')
    {
    	what.style.display='';
    }
    else
    {
    	what.style.display='none'
    }
    
    clearTimeout(timerID);
    																				
    }
    
    function closeall()
    {
    	var what = "";
    	subBureau.style.display='none'
    	subOpdrachtgever.style.display='none'
    }
    -->


    This is the code in the menu:

    Code:
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
    	<tr height="24">
                     <td height="24" bgcolor="#666666"><a href="index.php" target="_top" class="menu" onmouseover="timerID=setTimeout('closeall()',1);">Startpagina</a><a href="#" target="_top" class="menu" onmouseover="drop('subBureau');" onmouseout="timerID=setTimeout('closeall()',2500);">Bureau</a><a href="#" target="_top" class="menu" onmouseover="drop('subOpdrachtgever');" onmouseout="timerID=setTimeout('closeall()',2500);">Opdrachtgevers</a></td>
    	</tr>
    	<tr height="24" id="subBureau" style="display:none;">
                     <td height="24" bgcolor="#999999"><a href="expertise.php" target="_top" class="submenu" onmouseover="drop('subBureau');" onmouseout="timerID=setTimeout('closeall()',2500);">Expertise</a><a href="aanpak.php" target="_top" class="submenu" onmouseover="drop('subBureau');" onmouseout="timerID=setTimeout('closeall()',2500);">Aanpak</a></td>
    	</tr>
    	<tr height="24" id="subOpdrachtgever" style="display:none;">
                     <td height="24" bgcolor="#999999"><a href="projectontwikkelaars.php" target="_top" class="submenu" onmouseover="drop('subOpdrachtgever');" onmouseout="timerID=setTimeout('closeall()',2500);">Projectontwikkelaars</a><a href="corporaties.php" target="_top" class="submenu" onmouseover="drop('subOpdrachtgever');" onmouseout="timerID=setTimeout('closeall()',2500);">Corporaties</a></td>
    	</tr>
    </table>
    Last edited by LinkMaster; 04-25-2007 at 04:48 AM.

  2. #2
    Join Date
    Mar 2007
    Location
    U.K.
    Posts
    1,127
    Quote Originally Posted by LinkMaster
    Code:
    subBureau.style.display='none'
    subOpdrachtgever.style.display='none'
    You can't refer to elements via their ID; you've used document.getElementById elsewhere, so finish the job.

  3. #3
    Join Date
    Jun 2005
    Posts
    43
    Hi Ali.

    Thnx for your reply, but I don't know what you mean.

    It works on every browser except Macintosh FireFox and Macintosh NS.

    Can you give me an example of how to place the GetElement-part.


    Thnx,

    Leon

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles