User Name Password Register
DaniWeb IT Discussion Community
All
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
Reply
Join Date: Nov 2007
Posts: 1
Reputation: movcol is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
movcol movcol is offline Offline
Newbie Poster

ClamShell Menu Not Working in Foxfire

  #1  
Nov 9th, 2007
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!

<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>
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 5:05 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC