Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Single File for menu 1

Status
Not open for further replies.

ensorg

IS-IT--Management
Jan 9, 2002
229
GB
Hi All,

On the website that I am creating I have a "tree" menu is there anyway that i can load the information for the tree from a seperate file, like what can be done with javascript. So when changing the menu I do not have to change ever page.

Sample code is included below.

<HTML>
<HEAD>
<TITLE>THIS IS MY TEST MENU BUILDER PAGE</TITLE>
<script language=&quot;Javascript&quot; srC=&quot;tree.js&quot;></script>
</head>

<BODY Onload=&quot;WM_initialize_toolbar()&quot;>

<div id=&quot;container&quot;

style=&quot;position: absolute;

left: 10px; top:60px;

width:120px; height: 400px;

visibility: hidden;;

background-color: #003399;

layer-background-color: #003399;

border: 1px none #003399&quot;>

<div id=&quot;firstheader&quot;

style=&quot;position: absolute;

background-color: #003399;

layer-background-color: #003399;

width:150px; border: 1px none #000000&quot;>

<a href=&quot;#&quot; onClick=&quot;WM_toggle('first'); return false&quot;>first</a>

</div>

<div id=&quot;first&quot;

class=&quot;menu&quot;

style=&quot;position: absolute;

background-color: #6699FF;

layer-background-color: #FFFF00;

width:150px; border: 1px none #000000;&quot;>

This is the content of the first couple

</div>

<div id=&quot;secondtheader&quot;

style=&quot;position: absolute;

background-color: #003399;

layer-background-color: #0339966;

width:150px; border: 1px none #000000&quot;>

<a href=&quot;#&quot; onClick=&quot;WM_toggle('second'); return false&quot;>second</a>

</div>

<div id=&quot;second&quot;

class=&quot;menu&quot;

style=&quot;position: absolute; background-color: #6699FF; layer-background-color: #6699FF; width: 150; left: 1; top: -1; height: 38; border: 1px none #000000&quot;>

This is the content of the second couple

</div>

</div>

</BODY>
</HTML>
 
Hi,

You can do this with SSI but you will need to change your pages to .shtml so that the server knows to parse the information.

Just include <!--#include file=&quot;/navbar.html&quot; --> whereever on the page you want the info and then create a file called navbar.html and include the menu text in that.

Hope this helps Wullie

 
Okay, I'm starting to get the hang of table structure - thanks. Now, I'm suddenly missing something on SSI.

This HTML file works:

<TABLE BORDER=3 WIDTH=20% HEIGHT=80%>
<TR>
<TD ALIGN=&quot;center&quot;>
<object type=&quot;text/x-scriptlet&quot; width=&quot;100%&quot; height=&quot;100%&quot; data=&quot;nav.html&quot;>
</object>
</TD>
</TR>
</TABLE>


This SHTML file doesn't:
<TABLE BORDER=3 WIDTH=20% HEIGHT=80%>
<TR>
<TD>
<!--#include file=&quot;/nav.html&quot; -->
</TD>
</TR>
</TABLE>

I'm sure I'm missing something stupid, but I'm not seeing it. Help?

Thanks again!
s.
 
I am so sorry. I posted that last post in the wrong spot. Loooong day.

s.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top