PDA

View Full Version : Smart Folding Menu W/firefox 1.0.4



gr8pmkn
06-14-2005, 02:59 AM
Smart Folding Menu demo page (http://www.chevelleinfo.com/test_toc.htm) seems to work fine with IE but not with the Firefox 1.0.4 I just downloaded. Menu on the Smart Folding Menu (http://www.dynamicdrive.com/dynamicindex1/navigate1.htm) page doesn't even work in Firefox but does with IE. Firefox reports "folder content has no properties" and points the error to the line "if (foldercontent.style.display=="none"){"

Any suggestions?

::Correction - it does seem to work on the Smart Folding Menu page here on Dynamicdrive but only after I refresh the screen. Still does not work on my test page and I recopied all three sections and even disabled the cookie section...still nothing.

jscheuer1
06-15-2005, 09:35 AM
I get no error on the demo page with FF1.0.4, no reload needed. Also, your error is odd, probably just a typo though:
Firefox reports "folder content has no properties"is inconsistent with:
"if (foldercontent.style.display=="none"){"Notice the space between folder and content in the first quote and not in the second. Whatever, if you meant it without the space in both, then it would make some sense. Most likely the script is in the wrong part of the document relative to where the html content is or an onload handler isn't being executed at the proper time so,

.

Also, I've had trouble in the past using some of these scripts without their 'optional' persistence code. I'd try including it to be sure, rather than excluding it, thinking that will give a 'cleaner' test.

gr8pmkn
06-17-2005, 12:15 PM
URL of my site that doesn't seem to work is http://www.chevelleinfo.com. The error is copied and pasted just as highlighted through Tools > Javascript Console, no spaces added or deleted. I do notice it's part of the ns6 check, maybe that's it?

I've tried it with and without the 'persistence' code. Works fine in IE 6x both ways as well.

jscheuer1
06-17-2005, 08:14 PM
Well, the error at least is as I suspected:

Error: foldercontent has no properties
Source File: http://www.chevelleinfo.com/toc.htm
Line: 49

with no space. But, that doesn't help us much. The fault lies in the html section, as replacing that with the demo's works fine. I see it, sloppy coding:
<li><a href="body/intro.htm"><font size="1">Intrduction</a></font></li>besides misspelling 'Introduction', is wrong, IE will tolerate it but not FF, it should be:
<li><a href="body/intro.htm"><font size="1">Introduction</font></a></li>In a nutshell, always close the innermost tag first.

Don't forget this one:
<li><a href="etr/engines/aircleaner.htm"><font size="1">Air Cleaners</a> (ALL)</font></li>as it will be skipped in a global search and replace*.

Finally, you must close all tags for FF. This means you need one more:
</ul>before:
<li><a href="elcamino/main.htm"><font size="1">Place Holder</font></a></li>Of course, this means your place holder will show up but, you could comment it out or get rid of it.






* search for:

</a></font></li>

replace with:

</font></a></li>

gr8pmkn
06-19-2005, 05:43 PM
While I appreciate the coding comments, the misspelling of 'Introduction' as 'Intrduction' would have no effect on whether the word is displayed or not. I'm sure FF will tolerate misspellings in displayed text as well as anyone. ;)

Searched and replaced tags as you suggested and added missing </ul> seemed to fix the problem.

Thanks so much!