PDA

View Full Version : Smooth Navigational Menu problem



rob11
07-03-2009, 01:30 PM
1) Script Title: Smooth Navigational Menu (v1.3)

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

3) Describe problem: Putting menu in external fails to work.

When I call the menu.html from test.html, file the menu does not work.:confused:

http://melendy-mi.us/spartaumc/test.html


The external file below works fine.

http://melendy-mi.us/spartaumc/menu.html


The supporting files are:
http://melendy-mi.us/spartaumc/smooth%20menu/ddsmoothmenu.js
http://melendy-mi.us/spartaumc/smooth%20menu/ddsmoothmenu.css

all help appreciated:):):)

ddadmin
07-04-2009, 08:35 AM
Your external file (ie: menu.html) should contain just the markup of the menu, not the script references. For example, see the source of: http://www.dynamicdrive.com/dynamicindex1/smoothmenu.htm

rob11
07-04-2009, 11:14 AM
Your external file (ie: menu.html) should contain just the markup of the menu, not the script references. For example, see the source of: http://www.dynamicdrive.com/dynamicindex1/smoothmenu.htm

Thanks for responding.

I changed menu.htm. However test.html still don't work.


In test.html, Iwasn't sure about: <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

It doesn't work with or with out it.:confused:

molendijk
07-04-2009, 01:00 PM
I had problems too loading the Smooth Menu in an external file.
One way to solve the problem is given here (http://www.dynamicdrive.com/forums/blog.php?b=16).
If you want to apply something similar to the Smooth Navigational Menu, try this (http://molendijk.110mb.com/include_menu9/include_menu9smooth/index.html?page1.html) (which is an earlier version of the link above).
===
Arie Molendijk.

ddadmin
07-04-2009, 03:40 PM
Did you change: http://melendy-mi.us/spartaumc/menu.html? It looks the same to me, and hasn't been stripped of everything except the menu's HTML markup itself.

molendijk
07-04-2009, 04:11 PM
No, I didn't change anything. It's something I already had before rob11 posted his questions. They reminded me of a problem I had when I wanted to include the Smooth Menu using an external file. I solved the problem by passing data to index.html (which contains the menu).
===
Arie.

molendijk
07-04-2009, 05:11 PM
Hello ddadmin,
I posted my (first) answer to your question in a great hurry, so the answer may be unclear. I think rob11's problem has to do with the fact that the scripts for the Smooth Menu don't fire. I wrote something about it here (http://www.dynamicdrive.com/forums/showthread.php?p=197542#post197542). It explains more clearly what I wanted to say in my first answer to your question.
===
Arie.

ddadmin
07-04-2009, 06:50 PM
molendijk, yep, I understand the issue with browsers having trouble running any JavaScripts contained inside the file that's being dynamically fetched by Ajax. rob11's issue in this case though is different. The script does support a way to move the menu markup (just the markup, not the script itself) into an external file, and he's trying to get that to work. On the script page (http://www.dynamicdrive.com/dynamicindex1/ddsmoothmenu.htm), the second blue menu example at the bottom shows this working.

molendijk
07-04-2009, 07:34 PM
OK, I see.
And I seem to remember now the issue I had including the Smooth Menu. I tried to do it with the help of this include script (http://www.dynamicdrive.com/forums/blog.php?b=26), which turns out to work well with the All Levels Menu and the Anylink CSS Menu, but not with the Smooth Menu. (But DD's Ajax-include can handle it).
Anyhow, having a menu on every page the way it's explained here (http://www.dynamicdrive.com/forums/showthread.php?p=197542#post197542) and here (http://molendijk.110mb.com/include_menu9/include_menu9smooth/index.html?page1.html) has now become my favorite method, since the menu is not really included (so there can't be a problem there), but it 'receives' a new content's page depending on the (main) URL
===
Arie.

rob11
07-04-2009, 09:19 PM
Did you change: http://melendy-mi.us/spartaumc/menu.html? It looks the same to me, and hasn't been stripped of everything except the menu's HTML markup itself.


Yes your right. Some how I missed it. Now menu.html is clean. test.html still doesn't work.

ddadmin
07-05-2009, 12:09 AM
Inside menu.html, remove the code in red, it shouldn't be there:


<div id="smoothmenu-ajax" class="ddsmoothmenu">

<div id="smoothmenu1" class="ddsmoothmenu">

rob11
07-05-2009, 12:15 AM
:)Thank you, it now works.:)