•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 456,233 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,767 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 1811 | Replies: 0 | Solved
![]() |
•
•
Join Date: Nov 2007
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
Hi,
This clamshell menu code works fine in IE and Safari, but level 3 does not work in Firefox. When I click on 3-Level Menu - Level 2, the menu closes. Clicking on 3-Level Menu - Level 1 again shows the level 3 items were indeed opened. The 2-level menu works fine.
Does anyone know why this does not work in Firefox? Thanks!
This clamshell menu code works fine in IE and Safari, but level 3 does not work in Firefox. When I click on 3-Level Menu - Level 2, the menu closes. Clicking on 3-Level Menu - Level 1 again shows the level 3 items were indeed opened. The 2-level menu works fine.
Does anyone know why this does not work in Firefox? Thanks!
<HTML>
<HEAD>
<script>
function toggleMenu(objectID)
{
var objectblock = document.getElementById(objectID).style;
if (objectblock.display == 'block')
{
objectblock.display = 'none';
window.event.cancelBubble = true;
window.event.returnValue = false;
}
else
{
objectblock.display = 'block';
window.event.cancelBubble = true;
window.event.returnValue = false;
}
}
</script>
</HEAD>
<BODY>
<div onClick="toggleMenu('3level1')">3-Level Menu - Level 1
<div id='3level1' style='margin-left: 10%; display: none'>
<div onClick="toggleMenu('3level2')">3-Level Menu - Level 2 (clicking here not working in FF)
<div id='3level2' style='margin-left: 10%; display: none'>
<div onclick="event.cancelBubble = 'true'">Level 3 - anchor to desired page here</div>
<div onclick="event.cancelBubble = 'true'">Level 3 - another anchor here</div>
</div>
</div>
</div>
</div>
<div onClick="toggleMenu('2level1')">2-Level Menu - Level 1
<div id='2level1' style='margin-left: 10%; display: none'>
<div onclick="event.cancelBubble = 'true'">Level 2 - anchor to desired page here (works in FF)</div>
</div>
</div>
</BODY>
</HTML>![]() |
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- php/mysql dynamic multi-level menu problem (MySQL)
- CSS Menu Not Working on Mac (HTML and CSS)
- css menu in ie7 : a:hover behaviour only on text not on the whole box (HTML and CSS)
- Non working windows explorer - hijack log file please help (Viruses, Spyware and other Nasties)
- Easy drop down menu? (JavaScript / DHTML / AJAX)
- JS opacity menu Problems In IE - rare (HTML and CSS)
- Firefox vs. IE-menu not working please help (JavaScript / DHTML / AJAX)
- search bar not working (Windows NT / 2000 / XP / 2003)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: drop down quantity box to update price
- Next Thread: preloading image (white page between) problem


Linear Mode