SSI works on each page but not when linked

liunx

Guest
I have used a global stylesheet, included as:<br />
<br />
<link rel="stylesheet" href = <!-- m --><a class="postlink" href="http://www.webdeveloper.com/forum/archive/index.php/">http://www.webdeveloper.com/forum/archive/index.php/</a><!-- m -->"includes/mystyle.css" type = "text/css"><br />
<br />
I also have two SSI's, that are used to hold the javascript and div/ table structure for a drop down menu, so i can include the menu in every page without having to rewrite it- these are added as:<br />
<br />
<!--#include file="includes/jscript.shtm" --><br />
<!--#include file="includes/menu.shtm" --><br />
<br />
I have this code on every page.<br />
<br />
Whenever i preview the page it works fine, the css, javascript and menu all show and work great. But when i click on the links in the table, it takes me to the page but the menu doesn't show.<br />
<br />
If i start from the the page that menu didn't show on, the menu appears, but likewise, clicking on a link takes me to apge with no menu.<br />
<br />
So the menu appears on each page individually, but not when using the links.<br />
<br />
Does anyone know why this is, or offer advice on how to solve this?<!--content-->that might happen if the links a js writen, you havnt inlcuded the include command in the document.write function<!--content-->can you explain that a bit more i don't understand - your saying i need to use the include statement with document.write in my javascript for my menu ? how can i do that?<br />
<br />
:confused:<!--content-->it might be that is that the only javascript bits you have on the page?<!--content-->still don't follow.<br />
<br />
i put both the above includes into one include file to see if that would make a difference: it didn't, but at least its together now.<br />
<br />
so now i only have the one include and yes it is does contain the only javascript on the page.<br />
<br />
you were saying something before about document.write - well i've got these lines in the file:<br />
<br />
<SCRIPT language="JavaScript"><!--<br />
<br />
//browser stylesheets<br />
<br />
if(f7_ie){<br />
document.write('<style type="text/css"><!--')<br />
<br />
document.write('.dropdown {height:1px; width:100px; padding-left:10px; padding-top:10px; padding-right:10px; padding-bottom:10px;}')<br />
document.write('p { margin-top:0px; margin-bottom:6px }')<br />
document.write('a { text-decoration: none }')<br />
document.write('a:hover { color: white; text-decoration: underline }')<br />
document.write('--></style>')<br />
}<br />
<br />
</SCRIPT><br />
<br />
is this relevant?<!--content-->why are you having that as an extrenal js file cant you just have<br />
<br />
<link rel="stylesheet" href=http://www.webdeveloper.com/forum/archive/index.php/"FILENAME.css" type="text/css"><br />
<br />
and save this as FILENAME.css<br />
<br />
.dropdown {<br />
height:1px;<br />
width:100px;<br />
padding-left:10px;<br />
padding-top:10px;<br />
padding-right:10px;<br />
padding-bottom:10px;<br />
}<br />
p { <br />
margin-top:0px;<br />
margin-bottom:6px<br />
}<br />
a {<br />
text-decoration: none<br />
}<br />
a:hover {<br />
color: white;<br />
text-decoration: underline<br />
}<!--content-->i already have an external css file.<br />
the external js file is for the javascript behaviours for the menu, some div tags (where the styles are defined in the external css file) and a table structure for my menu.<br />
<br />
i've tried what you said: i deleted that code from the js file and defined it in the css file, but it still doesn't work - the menus won't appear when using the links.<br />
<br />
:confused:<!--content-->do you a working url you could post then could see the entire site/pages?<!--content-->its offline at the moment, i can't upload it till i can show its working fine :mad: <br />
<br />
i think i've found out whats causing the problem though. in the external javascript menu i've got a table structure that displays the menu. <br />
<br />
In each td is a reference to javascript functions to show or hide the drop down layers. eg:<br />
<br />
<table><br />
<tr><br />
<td><br />
<A href = <!-- m --><a class="postlink" href="http://www.webdeveloper.com/forum/archive/index.php/">http://www.webdeveloper.com/forum/archive/index.php/</a><!-- m -->"#" class="dropdown" onmouseover = "ShowDrop(0)" onmouseout = "HideDrop()" Menu 1</A></td><br />
</tr><br />
<br />
etc for each menu item.<br />
<br />
If i remove this table structure and place in the code it WILL appear on every page, but the javascript doesn't work. <br />
<br />
So i was wondering - is it possible to call the mouseover and mouseoff functions from an external javascript source eg:<br />
<br />
<td><br />
<A href = <!-- m --><a class="postlink" href="http://www.webdeveloper.com/forum/archive/index.php/">http://www.webdeveloper.com/forum/archive/index.php/</a><!-- m -->"#" class="dropdown" onmouseover = "includes/js_menu/ShowDrop(0)" onmouseout = "includes/js_menu/HideDrop()" Menu 1</A></td><br />
<br />
something similar to that?<br />
<br />
any help is appreciated.<!--content-->yes it is possible but your wont need includes/js_menu/ShowDrop(0) just ShowDrop(0) because the js file in the head will be read before the link so when click the link it will refer to the js script<!--content-->thats exactly what i thought but that doesn't seem to be it.<br />
<br />
something weird i've just discovered - if i open the page in dreamweaver, then preview it in a broswer (f12), the menu shows up on the page, but if i open the page by double clicking the icon in the folder, the same page appears with no menu.<br />
<br />
Do you think this might have something to do with why only the first page will show a menu? <br />
<br />
I was going to upload a sample, if anyone would mind taking a look at it i'd greatly apprectiate it.<!--content-->heres the sample if anyones got ANY suggestions.<br />
<br />
The two pages i'm testing on (page1.html & page 2.html) are from the submenus under heading 1 - submenu 1 (page1) and submenu 2 (page2).<br />
<br />
you might have to open them in dreamweaver to see the ssi - read the above post.<br />
<br />
<br />
cheers<!--content-->does it matter if in the shtml file theres <javascript> </script> tags ?<br />
<br />
I've read you can't have <html> or <body> or <head> so maybe thats something to do with it?<!--content-->
 
Back
Top