PDA

View Full Version : SSI with Smooth Menu



derspankster
12-23-2009, 09:29 PM
1) Script Title: Smooth Navigational Menu (v1.31)

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

3) Describe problem: I've been struggling to use ajax to place the menu on multiple pages. I prefer an external file so that the menu can be modified in a single place. I have experience with server side includes. Can this script be used with SSI?

djr33
12-23-2009, 09:42 PM
The script requries some code in the head section of the page and some code in the body section.
Because of this, a simple SSI would not work, because you need two instances of code inserted in every page.
You could insert the code easily enough if you can do two SSIs per page, but I forget the limits of how SSI works-- I think this would be ok, right?
You could certainly do this with a more functional serverside language with more options like PHP or ASP.

derspankster
12-23-2009, 10:08 PM
I'm sure you are right. I've played with creating a container for calling the menu script and crreated a "smoothmenu.htm" on my server that contains my menu elements. For some reason, it doesn't seem to work properly. Since I have zero experience with ajax it doesn't surprise me. I don't think I'm calling the htm file correctly.

Mt thinking with SSI was to include the head section of the code on every page and then SSI the menu elements only for each page.

I appreciate your reply. Happy Holidays!

djr33
12-23-2009, 10:19 PM
Yes, if you only want one element (head or body) stored externally so you can modify all pages at once, and you can include the other one manually, then you could use one SSI in each page then (instead of 2).

derspankster
12-24-2009, 02:35 AM
I continue to stumble along. I finally got ajax to work and it correctly calls smoothmenu.htm. Now, i have another problem. I've modified the original code to add another menu item before the last inline item. Now, the inline menu doesn't render. Here is my smoothmenu.htm. Not sure what's going on.


<div id="smoothmenu-ajax" class="ddsmoothmenu">
<ul>
<li><a href="http://www.lairdslair.com/">Home</a></li>
<li><a href="#">Sports</a>
<ul>
<li><a href="http://www.lairdslair.con/Browns.shtml">Cleveland Browns</a></li>

<li><a href="http://www.lairdslair.com/Indians.shtml">Cleveland Indians</a></li>
<li><a href="http://www.lairdslair.com/jekyll09.shtml">Jekyll Island Golf</a></li>
<li><a href="http://www.lairdslair.com/PublicCourses.shtml">Public Golf Courses</a></li>
<li><a href="http://www.lairdslair.com/PrivateCourses.shtml">Private Golf Courses</a></li>
<li><a href="http://espn.go.com/">ESPN</a></li>
</ul>
</li>
<li><a href="#">Help Pages</a>
<ul>
<li><a href="http://www.lairdslair.com/ubuntulinux.shtml">Ubuntu Linux</a></li>
<li><a href="http://www.lairdslair.com/TX97E.shtml">TX97E M/B</a></li>
<li><a href="http://www.lairdslair.com/printserver.shtml">Print Server Setup</a></li>
<li><a href="http://www.lairdslair.com/shady.shtml">Web Site Design</a></li>
</ul>
</li>
<li><a href="#">Opinion</a>
<ul>
<li><a href="http://www.lairdslair.com/Soapbox.shtml">My Soapbox</a></li>
<li><a href="http://www.lairdslair.com/TVOR.shtml">TVOR</a></li>
<li><a href="http://www.lairdslair.com/Goo.shtml">Goo Glenn Beck</a></li>
</ul>
</li>
<li><a href="#">Resources</a>
<ul>
<li><a href=
"http://www.lairdslair.com/favlinks.shtml">Links</a></li>
<li><a href="http://www.lairdslair.com/vidoweek.shtml">Weekly Video</a></li>
<li><a href="http://www.lairdslair.com/South.shtml">lairdslair South</a></li>
<li><a href="http://www.lairdslair.com/MitchRyderPage.shtml">Mitch Ryder</a></li>
<li><a href="http://www.lairdslair.com/Descendants.shtml">Laird Family Tree</a></li>
<li><a href="http://www.lairdslair.com/Resources.shtml">Web Resources</a></li>
<li><a href="http://www.lairdslair.com/stpauls.htm">St. Paul's Lutheran</a></li>
</ul>
</li>
<li><a href="http://www.lairdslair.com/webcam.shtml">Web Cam</a></li>
<li><a href="#">Music</a>
<ul>
<li><a href="http://www.lairdslair.con/darkroom.shtml">Music by the darkroom</a></li>
<li><a href="#">Internet Radio</a>
<ul>
<li><a href="#">Stations</a></li>
<li style="list-style: none; display: inline">
<ul>
<li><a href="http://win.2.c3.audiovideoweb.com/2c3winlive6767?.wma">WVXG Rock Marion</a></li>
<li><a href="http://www.wbgo.org/listennow/wbgo_8000.asx">WBGO Jazz</a></li>
<li><a href="http://www.kuvo.org/KUVO/streamtest/kuvohi.asx">KUVO Jazz</a></li>
<li><a href="http://www.oldiesradionet.com/oldies56.asx">Oldies Radionet</a></li>
<li><a href="mms://streaming1.osu.edu/wmtencoder/wosu-fm.wmv">WOSU Classical</a></li>
</ul>
</li>
<div id="smoothmenu-ajax" class="ddsmoothmenu">
<br style="clear: left" />
</div>

I apologize if I should not have posted all that.

djr33
12-24-2009, 05:00 AM
Ajax has some limitations in what can then be used in javascript. In other words, there are limits on dynamic javascript working on a page, for security reasons, I suppose. My area is more with server side code, though, so I hope someone else can give you the full details on that.

derspankster
12-24-2009, 06:46 PM
Well, I have it working now. One of my folders has a double width shadow but outside of that it seems OK.