PDA

View Full Version : Smooth Navigation Menu External File Issue



lirium
01-01-2011, 12:43 PM
1) Script Title:
Smooth Navigation Menu (v1.5)
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex1/ddsmoothmenu.htm
3) Describe problem:
Hi
I run a site with over 200 pages and I can get this menu script to work when embedded into the hmtl of a page. however, it will not work when being imported from an external file.
The file uploaded to the server are;

- ddsmoothmenu.js
- ddsmoothmenu.css
- ddsmoothmenu-v.css
- 2 images:
-menu.html
-dynmenu.html
-dynmenuv2.html
-jquery.min.js

The URL of the working page is;
http://www.beeslack.info/dynmenu.html

The URL of the non working page is ;
http://www.beeslack.info/dynmenuv2.html

The actual menu bar appears but no drop down options nor the images.

Any help will be greatly appreciated.
It will in all likelyhood something silly i've done.

vwphillips
01-01-2011, 03:09 PM
on your working page

there is no object with an ID of 'smoothmenu2'

and there are two sets of DOC type

jscheuer1
01-02-2011, 06:24 AM
True, and two html tags. Any or all of which can cause problems in some browsers, if not with this script, then possibly with other things currently on the page or that might be added later. But they don't prevent the menu from working in Firefox here. All of these problems are also true of the non-working page. In addition the non-working page lacks an element with an id of 'smoothmenu1'. That prevents the menu from working at all on that page.

lirium
01-02-2011, 07:46 PM
The menu has been moved to the external file called "menu.html", therefore this should include "smoothmenu1"
ddsmoothmenu.init() has then been amended to reference to this external file (menu.html) rather than have the menu in each of the 200 pages.
i still can't figure out the problem.

jscheuer1
01-03-2011, 03:47 AM
The include with the 'smoothmenu1' element on it is either not being included or lacks this element. It may have the menu structure, but the id="smoothmenu1" attribute is missing from it.

Look at the browser's 'view source' with the non-working page loaded in the browser. Copy and paste that into a text only editor like NotePad. Do a search for:

smoothmenu1

You will see that it only appears once, in the init. There's no element with that id.

lirium
01-07-2011, 03:57 PM
hi
still been trying to find and fix the error but no luck
might just have to paste working script into all 214 pages rather than the planned file import