PDA

View Full Version : Help with Spry Menu as Server Side Includes


Danp
02-25-2008, 08:14 PM
Let me first say that I'm a noobie.

I'm having issues making a simple spry vertical menu as a server side include.

I created the spry menu in a blank html file. I then used the server-side includes option to include it in my existing page.

It will add it, but the spry menu is all text links instead of the original spry menu. See attachment.

-- Here's the menu code --


<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table width="740" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><ul id="MenuBar1" class="MenuBarHorizontal">
<li><a class="MenuBarItemSubmenu" href="#">Item 1</a>
<ul>
<li><a href="#">Item 1.1</a></li>
<li><a href="#">Item 1.2</a></li>
<li><a href="#">Item 1.3</a></li>
</ul>
</li>
<li><a href="#">Item 2</a></li>
<li><a class="MenuBarItemSubmenu" href="#">Item 3</a>
<ul>
<li><a class="MenuBarItemSubmenu" href="#">Item 3.1</a>
<ul>
<li><a href="#">Item 3.1.1</a></li>
<li><a href="#">Item 3.1.2</a></li>
</ul>
</li>
<li><a href="#">Item 3.2</a></li>
<li><a href="#">Item 3.3</a></li>
</ul>
</li>
<li><a href="#">Item 4</a></li>
</ul>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
//-->
</script>
</body>
</html>


Any help is greatly appreciated

Thanks,

Dan

m1a2x3x7
02-25-2008, 11:57 PM
make sure js file and css file are in the correct file location.

Danp
02-26-2008, 01:33 PM
make sure js file and css file are in the correct file location.

Dreamweaver automatically puts them into a folder called SpryAssets which is located in the root folder of the web site along with all the html files.

Danp
02-26-2008, 03:18 PM
Damn, I've tried everything. I can't get the spry vert menu to be a server-side include. It's probably a simple fix, but I can't seem to figure it out.

Any help please??

domedia
02-26-2008, 04:30 PM
The HTML document is linking to SpryAssets/SpryMenuBarHorizontal.css.
This file is either not in that location, or there's something lacking inside the file. You can tell from your screenshot it has an issue reading the CSS.

Danp
02-26-2008, 05:04 PM
The HTML document is linking to SpryAssets/SpryMenuBarHorizontal.css.
This file is either not in that location, or there's something lacking inside the file. You can tell from your screenshot it has an issue reading the CSS.

Yup, but I can't figure out what. I didn't move or rename anything. Simpley clicked Server Side Inlcude and pointed to the menu.html file.

Danp
02-26-2008, 06:46 PM
I just don't understand. The spry menu works perfectly well on it's own. As soon as I add it to the index page as a SSI it goes nuts. I mean it wipes out all tables that I've created, and the menu comes up as links only.

I even attached the menu style sheet to the index.html page. That helped as the styling of the menu worked, but it still knocked out all the tables and code for the index page.

I'm stumped.

edbr
02-27-2008, 12:28 AM
it sound like you have a conflict in your styling

Danp
02-27-2008, 01:06 PM
I've made some progress. the only way I can get it to work is if the styling sheet is connected to the index page and not the menu SSI. But that messes up my page stylings. arrrrhhhh

Rob_Che
03-01-2008, 10:52 AM
I've made some progress. the only way I can get it to work is if the styling sheet is connected to the index page and not the menu SSI. But that messes up my page stylings. arrrrhhhh

Can you create a duplicate .css file for the page and rename it?
A bit cack handed as it gives you no answers but might work.