Log in

View Full Version : Header



crazytyler34
04-26-2006, 04:20 AM
I have a seperate file that is called header2.html and the code for it is:

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="chrometheme/dropdownmenu.css" />
<script type="text/javascript" src="chrometheme/chrome.js">
</script>
<img src="title.jpg" width="95%" height="124" />
<div id="chromemenu">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="forums.html">Forums</a></li>
<li><a href="#" onMouseover="cssdropdown.dropit(this,event,'dropmenu1')">Videos</a></li>
<li><a href="#" onMouseover="cssdropdown.dropit(this,event,'dropmenu2')">Pictures</a></li>
<li><a href="http://cnn.com" onMouseover="cssdropdown.dropit(this,event,'dropmenu3')">Links</a></li>
</ul>
</div>

<!--1st drop down menu -->
<div id="dropmenu1" class="dropmenudiv">
<a href="basketball.html">Basketball</a>
<a href="redvsblue.html">Red vs. Blue</a>
<a href="sports.html">Other Sports</a>
<a href="cool.html">Other Videos</a>
</div>

<!--2nd drop down menu -->
<div id="dropmenu2" class="dropmenudiv" style="width: 150px;">
<a href="dash/index.htm">Dash</a>
<a href="snow penis/index.htm">Snow Penis</a>
<a href="destruction/index.htm">Destruction</a>
<a href="newspaper/index.htm">Newspaper(coming soon)</a>
</div>

<!--3rd anchor link and menu -->
<div id="dropmenu3" class="dropmenudiv" style="width: 150px;">
<a href="http://www.google.com/">Google</a>
<a href="http://www.yahoo.com">Yahoo</a>
<a href="http://www.stupidvideos.com">Cool Videos</a>
<a href="http://www.addictinggames.com">Games</a>
</div>

when i try to put into the body on another page using the command:

<!-- #include="header2.html"--> nothing shows up...i am using dreamweaver and when i preview it in firefox nothing shows up...please help

crazytyler34
04-26-2006, 05:22 AM
i figured it out...nevermind the command is
<!--#include file="header2.html" -->

djr33
04-26-2006, 06:57 AM
random note... but realize that is, i think, a method DW uses to join the pages together for you. If you uploaded the raw page, it would be just a comment, and nothing would show up.
so... you must use dw to edit that page.

look into php for this (really easy) if you want a more versatile/controllable system)
code example: --replace the above code with this:

<?php include("header2.html"); ?>

note: only works on a server that has php enable to interpret the pages... won't work locally (though DW does have some support for faking it)

Twey
04-26-2006, 07:24 AM
The above is SSI, actually, and will work on a server with SSI support.

djr33
04-26-2006, 10:16 AM
<!--#include file="header2.html" -->
That is? Or my php? I think you mean the above line.

Hmm... didn't know that. Sorry for being misleading, crazytyler.

Twey
04-26-2006, 03:21 PM
That is? Or my php? I think you mean the above line.Obviously not the PHP. :p

djr33
04-27-2006, 11:09 AM
Ha, ok.

I've heard php called server side includes... after all, it IS, but not the technical term... just the meaning.... including stuff serverside.
Nevermind.

Carry on :)