Can i have external html?

liunx

Guest
Am i able to have external html? Cause everytime one part of my header or footer changes, i then have to change 12+ pieces of code. It would be alot easier to be able to change just 2 external scripts to change. Thanks!<!--content-->im not understanding exactly whats going on? header and footer changes? external code?<!--content-->when i change a link in my website that is on my header or footer, i have to go through every page (7 of them) and change all of the links so that they all go to the right one.<!--content-->can you send me a link?<br />
<br />
you have links in your header and footer? they shouldnt even show up, as they need to be in the body of the page, not the header ... <br />
<br />
wait ....<br />
<br />
ohhhhhhhhhhhhhh, i was thinking you had links or code in the part of the page ( () is substituted for [] ) am i correct? you have the header, which is basically the top part of the page, and a footer, which is the bottom part of the page.... am i correct?<!--content-->correct.<!--content-->ok..yea, i was just at ur site and saw the message board post for html help ...<br />
<br />
yea, its called SSI ... i currently using it on a site im working on:<br />
<br />
<!-- w --><a class="postlink" href="http://www.satworld.biz/new.shtml">www.satworld.biz/new.shtml</a><!-- w --><br />
<br />
the whole header, footer, and in the pages into the site, the related links, etc on the right, they are all called up using SSI....<br />
<br />
SSI=server side includes ....<br />
<br />
unfortunately, geocities wont support this ... you have to get a hosting account with your domain that supports SSI ... and the code is easy ...<br />
<br />
<!--#include virtual="/html/0pgheader.dat"--><br />
<br />
like thats one of mine for the header .. the .dat can be a text file if you want...i just made it dat .... then you just make the header and its code in the dat file, and save it...then from now on, to update the header, just update the dat file ....<br />
<br />
but as i said, geocities doesnt support it (from what i know) ... so have to get your own domain and hosting account .. might be other free hosts that support it, but i dunno of any ..<!--content-->thanks for telling me. i will see if i can find a host that supports it. <br />
<br />
just wondering if anyone else has any ideas other than SSI?<!--content-->http://www.imhosted.com/compare_plans_detailed.shtml<br />
<br />
they have a cheap hosting solution, but they give you alot, and support SSI, among plenty of other things at no extra charge ...<!--content-->I just thought of something! I could maybe use inline frames! But there are two reasons that would keep me from not using them.<br />
<br />
1. Inline frames arent used by all browsers.<br />
2. I would have to redo my page a bit to make it look nice again.<!--content-->you could, but more likely, youll tell the difference between the page and the inline frames...as far as i know, you can always tell? but im not sure, so i could be wrong ... if so, i wouldnt do that ... <br />
<br />
SSI is prob the easiest way to go...other ways include ASP, ColdFusion, etc ....<!--content-->asp, coldfusion, php etc all support includes.<!--content-->Actualy it can be done with Javascript and heres the code for how it would look in your source code: <br />
<br />
<br />
<html> <br />
<head> <br />
<title>YOUR EXCITING PAGE</title> <br />
</head> <br />
<br />
<body> <br />
<br />
<SCRIPT LANGUAGE="JavaScript" type="text/javascript" src=http://www.htmlforums.com/archive/index.php/"header.txt"></SCRIPT> <br />
<br />
Then main page content goes here. <br />
<br />
<SCRIPT LANGUAGE="JavaScript" type="text/javascript" src=http://www.htmlforums.com/archive/index.php/"footer.txt"></SCRIPT> <br />
<br />
</body> <br />
</html> <br />
<br />
<br />
The two external files would have to be written in JavaScript but have the .txt extension. For instance if you had a navigation bar that was going to be used for 100 HTML pages it would look like this on a normal HTML page: <br />
<br />
<p><a href=http://www.htmlforums.com/archive/index.php/"page1.html">Page One</a> <br />
<p><a href=http://www.htmlforums.com/archive/index.php/"page2.html">Page Two</a> <br />
<p><a href=http://www.htmlforums.com/archive/index.php/"page3.html">Page Three</a> <br />
<br />
<br />
For the external file it would have to be written with no line breaks at all, so it would be one long line, so it would look like this: <br />
<br />
<p><a href="page1.html">Page One</a><p><a href="page2.html">Page Two</a><p><a href=http://www.htmlforums.com/archive/index.php/"page3.html">Page Three</a> <br />
<br />
<br />
Then you need to use a document.write command like this: <br />
<br />
document.write('<p><a href=http://www.htmlforums.com/archive/index.php/"page1.html">Page One</a><p><a href="page2.html">Page Two</a><p><a href="page3.html">Page Three</a>') <br />
<br />
<br />
Dont forget to keep it all on one long line, dont hit the return button at all. So then all you need to do is up date the one header.txt or footer.txt file and you have updated a 100 page web site in about 20 minutes.<br />
<br />
<br />
I copied this from a thread that I answerd a while back, its not essential to have it all on one line I have since found out. Enjoy! :cool:<!--content-->
 
Back
Top