PDA

View Full Version : Switch Menu II not working in Firefox



unclebobbo
02-25-2006, 02:53 PM
Switch Menu II
http://www.dynamicdrive.com/dynamicindex1/switchmenu2.htm

My menu works fine in IE6 but in Firefox 1.5.0.1 it works correctly when each top item is opened for the first time however on subsequent openings the lower top items do not move down so the sub items overlap the lower top items. The code does not validate as the Validator does not like classOver and classOut as attributes yet the demo version on the URL above uses classOver and classOut and works fine in Firefox. Any ideas?

jscheuer1
02-25-2006, 02:58 PM
PLEASE: Include the URL to your problematic webpage that you want help with.

unclebobbo
02-25-2006, 03:02 PM
http://www.westendgc.co.uk

jscheuer1
02-25-2006, 03:21 PM
Remove the DOCTYPE from your WENav.htm page.

unclebobbo
02-25-2006, 04:03 PM
Many thanks, Mad Professor, problem solved.

Twey
02-25-2006, 04:06 PM
Hardly. I'm sure the classOver and classOut could be built into the menu constructor so as to avoid using non-standard attributes.

sharmin
07-13-2006, 03:28 AM
Remove the DOCTYPE from your WENav.htm page.
"98.824% Works in Quirks"

Where to plug it in...I tried it at the top of the page. It did not work. Will you please give me the first two lines. I am very new in this area.Thank you for reading. Please reply.

jscheuer1
07-13-2006, 03:46 AM
"98.824% Works in Quirks"

Where to plug it in...I tried it at the top of the page. It did not work. Will you please give me the first two lines. I am very new in this area.Thank you for reading. Please reply.

Hey, that's just my tag line! What are you talking about anyways? You need to make your question much clearer, sharmin:

Warning: Please include a link to the DD script in question in your post. See this thread (http://www.dynamicdrive.com/forums/showthread.php?t=6) for the proper posting format when asking a question.

Please post a link to the page on your site that contains the problematic script so we can check it out.

And please spell out clearly what your problem is, we are not mind readers, even if it seems that way at times.

sharmin
07-13-2006, 03:47 PM
Hey, that's just my tag line! What are you talking about anyways? You need to make your question much clearer, sharmin:

Warning: Please include a link to the DD script in question in your post. See this thread (http://www.dynamicdrive.com/forums/showthread.php?t=6) for the proper posting format when asking a question.

Please post a link to the page on your site that contains the problematic script so we can check it out.

And please spell out clearly what your problem is, we are not mind readers, even if it seems that way at times.


Hello I am having problem with the switch menu 2. It works fine in Internet Explorer, but in firefx, it does not work okay.

I copied and pasted the exact code.
My html file looks as below:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"98.824% Works in Quirks">
<html>
<head>
<title>Untitled Document</title>
<link rel="stylesheet" type="text/css" href="sddm.css" />


<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">




<body>
<script language="JavaScript" type="text/javascript" src="menu.js"></script>


<div class="mainDiv" state="0">
<div class="topItem" classOut="topItem" classOver="topItemOver" onMouseOver="Init(this);" > Demo Menu 1</div>
<div class="dropMenu" >
<div class="subMenu" state="0">
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://northregion/NROS/" target="_blank">North region Districts: 1, 2, 3</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://d4web"target="_blank">--Oakland District 4</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://sv06web/pjd/surveys/" target="_blank">--Central Region Districts: 5, 6, 9, 10</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://t7www/Surveys/home/index.asp" target="_blank">--Los AngelesDistrict 7</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://northregion/NROS/" target="_blank">North region Districts: 1, 2, 3</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://d4web"target="_blank">--Oakland District 4</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://sv06web/pjd/surveys/" target="_blank">--Central Region Districts: 5, 6, 9, 10</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://t7www/Surveys/home/index.asp" target="_blank">--Los AngelesDistrict 7</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://northregion/NROS/" target="_blank">North region Districts: 1, 2, 3</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://d4web"target="_blank">--Oakland District 4</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://sv06web/pjd/surveys/" target="_blank">--Central Region Districts: 5, 6, 9, 10</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://t7www/Surveys/home/index.asp" target="_blank">--Los AngelesDistrict 7</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://northregion/NROS/" target="_blank">North region Districts: 1, 2, 3</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://d4web"target="_blank">--Oakland District 4</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://sv06web/pjd/surveys/" target="_blank">--Central Region Districts: 5, 6, 9, 10</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://t7www/Surveys/home/index.asp" target="_blank">--Los AngelesDistrict 7</a></span><BR />
</div>
</div>
</div>



<BR />

<div class="mainDiv" state="0">
<div class="topItem" classOut="topItem" classOver="topItemOver" onMouseOver="Init(this)" > Demo Menu 2</div>
<div class="dropMenu" >
<div class="subMenu" state="0">
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://www.slashdot.org">Slash Dot</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://news.com">News.com</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://wired.com">Wired News</a></span>
</div>
</div>
</div>


<BR />

<div class="mainDiv" state="0">
<div class="topItem" classOut="topItem" classOver="topItemOver" onMouseOver="Init(this)" > Demo Menu 3</div>
<div class="dropMenu" >
<div class="subMenu" state="0">
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://cnn.com">CNN</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://msnbc.com">MSNBC</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://news.bbc.co.uk">BBC News</a></span>
</div>
</div>
</div>

</body>
</html>
.......................
If I remove DOCTYPE, what I should put there?

Pleease tell me the first two lines.
And also, I get 16 errors from css file, but the css file, that I am using, I got from here. Please respond as I need help. i tried a lot two change the first two line.

Another thing that I should mention that I am switching this menu at a template, as a nevagation bar; I basically call the java function at that navigation bar. The template is made of multiple layers but not frames. If I remove the DOC type, the whole template might get affected. What I should do?

sharmin
07-13-2006, 05:06 PM
Hello I am having problem with the switch menu 2. It works fine in Internet Explorer, but in firefx, it does not work okay.

I copied and pasted the exact code.
My html file looks as below:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"98.824% Works in Quirks">
<html>
<head>
<title>Untitled Document</title>
<link rel="stylesheet" type="text/css" href="sddm.css" />


<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">




<body>
<script language="JavaScript" type="text/javascript" src="menu.js"></script>


<div class="mainDiv" state="0">
<div class="topItem" classOut="topItem" classOver="topItemOver" onMouseOver="Init(this);" > Demo Menu 1</div>
<div class="dropMenu" >
<div class="subMenu" state="0">
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://northregion/NROS/" target="_blank">North region Districts: 1, 2, 3</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://d4web"target="_blank">--Oakland District 4</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://sv06web/pjd/surveys/" target="_blank">--Central Region Districts: 5, 6, 9, 10</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://t7www/Surveys/home/index.asp" target="_blank">--Los AngelesDistrict 7</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://northregion/NROS/" target="_blank">North region Districts: 1, 2, 3</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://d4web"target="_blank">--Oakland District 4</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://sv06web/pjd/surveys/" target="_blank">--Central Region Districts: 5, 6, 9, 10</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://t7www/Surveys/home/index.asp" target="_blank">--Los AngelesDistrict 7</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://northregion/NROS/" target="_blank">North region Districts: 1, 2, 3</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://d4web"target="_blank">--Oakland District 4</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://sv06web/pjd/surveys/" target="_blank">--Central Region Districts: 5, 6, 9, 10</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://t7www/Surveys/home/index.asp" target="_blank">--Los AngelesDistrict 7</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://northregion/NROS/" target="_blank">North region Districts: 1, 2, 3</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://d4web"target="_blank">--Oakland District 4</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://sv06web/pjd/surveys/" target="_blank">--Central Region Districts: 5, 6, 9, 10</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://t7www/Surveys/home/index.asp" target="_blank">--Los AngelesDistrict 7</a></span><BR />
</div>
</div>
</div>



<BR />

<div class="mainDiv" state="0">
<div class="topItem" classOut="topItem" classOver="topItemOver" onMouseOver="Init(this)" > Demo Menu 2</div>
<div class="dropMenu" >
<div class="subMenu" state="0">
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://www.slashdot.org">Slash Dot</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://news.com">News.com</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://wired.com">Wired News</a></span>
</div>
</div>
</div>


<BR />

<div class="mainDiv" state="0">
<div class="topItem" classOut="topItem" classOver="topItemOver" onMouseOver="Init(this)" > Demo Menu 3</div>
<div class="dropMenu" >
<div class="subMenu" state="0">
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://cnn.com">CNN</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://msnbc.com">MSNBC</a></span><BR />
<span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://news.bbc.co.uk">BBC News</a></span>
</div>
</div>
</div>

</body>
</html>
.......................
If I remove DOCTYPE, what I should put there?

Pleease tell me the first two lines.
And also, I get 16 errors from css file, but the css file, that I am using, I got from here. Please respond as I need help. i tried a lot two change the first two line.

Another thing that I should mention that I am switching this menu at a template, as a nevagation bar; I basically call the java function at that navigation bar. The template is made of multiple layers but not frames. If I remove the DOC type, the whole template might get affected. What I should do?


OH! I think I have fixed the problem. I removed the first two lines from the template page.

jscheuer1
07-13-2006, 06:22 PM
Yeah, that was the meaning of my original advice to the first person asking the same or a similar question in this thread. Simply remove the DOCTYPE.

Twey, who added something to the discussion is right, this should be able to be made to work with a DOCTYPE but, that would require a rewrite (perhaps a substantial one) to the script.