PDA

View Full Version : Drop down menus not appearing for pages in subdirectories



infofornyc
01-16-2012, 06:29 AM
1) Script Title: Smooth Navigational Menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/ddsmoothmenu.htm

3) Describe problem:
I can get the script to work no problem when placed in my base domain as such:
http://www.infofornyc.com/navmenuprob.html

When I copy the exact same html page and place it in a subdirectory as such, the drop downs no longer work: http://www.infofornyc.com/travel/navmenuprob.html

Any ideas? I don't want to have multiple copies of the CSS files everywhere. I hope it's nothing too hard to fix.

jscheuer1
01-16-2012, 10:24 AM
There could also be other problems. But one certainly is that on the non-working page the highlighted:


</div></div><!-- End Footer --><!-- #EndLibraryItem -->
<!--[if !IE]> -->
<script type="text/javascript" src="style/js/jquery.corner.js"></script>
<!-- <![endif]-->
<script type="text/javascript" src="style/js/scripts.js"></script>
</body>
</html>

is a 404 Not Found. On the working page it isn't. It contains (among other things) the initialization for the menu, the:


ddsmoothmenu.init({
mainmenuid: "menu",
orientation: 'h',
classname: 'menu',
contentsource: "markup"
})

If you were to change it to:


</div></div><!-- End Footer --><!-- #EndLibraryItem -->
<!--[if !IE]> -->
<script type="text/javascript" src="style/js/jquery.corner.js"></script>
<!-- <![endif]-->
<script type="text/javascript" src="../style/js/scripts.js"></script>
</body>
</html>

that should take care of it.

The browser cache may need to be cleared and/or the page refreshed to see changes.

infofornyc
01-16-2012, 06:04 PM
That's it. Thanks for taking the time. I had purchased this template and didn't realize that some of the javascript was on the bottom of the page. I'll check more thoroughly next time. Thanks!