ClamShell Menu Not Working in Foxfire

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved

Join Date: Nov 2007
Posts: 1
Reputation: movcol is an unknown quantity at this point 
Solved Threads: 0
movcol movcol is offline Offline
Newbie Poster

ClamShell Menu Not Working in Foxfire

 
0
  #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!

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <HTML>
  2. <HEAD>
  3. <script>
  4. function toggleMenu(objectID)
  5. {
  6. var objectblock = document.getElementById(objectID).style;
  7.  
  8. if (objectblock.display == 'block')
  9. {
  10. objectblock.display = 'none';
  11. window.event.cancelBubble = true;
  12. window.event.returnValue = false;
  13. }
  14. else
  15. {
  16. objectblock.display = 'block';
  17. window.event.cancelBubble = true;
  18. window.event.returnValue = false;
  19. }
  20. }
  21. </script>
  22. </HEAD>
  23.  
  24. <BODY>
  25. <div onClick="toggleMenu('3level1')">3-Level Menu - Level 1
  26. <div id='3level1' style='margin-left: 10%; display: none'>
  27. <div onClick="toggleMenu('3level2')">3-Level Menu - Level 2 (clicking here not working in FF)
  28. <div id='3level2' style='margin-left: 10%; display: none'>
  29. <div onclick="event.cancelBubble = 'true'">Level 3 - anchor to desired page here</div>
  30. <div onclick="event.cancelBubble = 'true'">Level 3 - another anchor here</div>
  31. </div>
  32. </div>
  33. </div>
  34. </div>
  35. <div onClick="toggleMenu('2level1')">2-Level Menu - Level 1
  36. <div id='2level1' style='margin-left: 10%; display: none'>
  37. <div onclick="event.cancelBubble = 'true'">Level 2 - anchor to desired page here (works in FF)</div>
  38. </div>
  39. </div>
  40. </BODY>
  41. </HTML>
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



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


Views: 2382 | Replies: 0
Thread Tools Search this Thread



Tag cloud for JavaScript / DHTML / AJAX
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC