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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

loading common HTML code from a file as a header to HTML page

Status
Not open for further replies.

Cresby

Programmer
Aug 15, 2002
287
GB
Apart from frames or JavaScript - is there a way to load a common section of code before or even after the unique code contained in the loading file.

I was sure I had done this but maybe it was in JavaScript. Frames may be the only way but I was told it makes it harder for search engines and some people insist on linking to me in frames so I have a few TARGET="_top" attributes where frrames become counter-productive. Java I limit to non-essential functions so that if it falls over on a given browser or has been switched-off the information is intact.

Dreamweaver MX tells me a lot in it's reference functionality but I still can't see what I did do once.

Any ideas guys?
 
Go to google, search for "SSI" or server-side includes.

--Chessbot

"See the TURTLE of enormous girth!"
-- Stephen King, The Dark Tower series
 
Ta but-
I haven't got server side program availability.
I guess I must have use JavaScript
 
Javascript is disabled for 90%+ viewers. I would just use copy+paste, but if you will use javascript see forum216.

--Chessbot

"See the TURTLE of enormous girth!"
-- Stephen King, The Dark Tower series
 
Javascript is disabled for 90%+ viewers.
I think it's probably enabled for 90% of users, and disabled for 10% - but the point is the same, you can't rely on JS for anything important.

If you're using Dreamweaver, look into "templates". I'm too dedicated a hand-coder to play with DW myself, but my understanding is that you can define a page to have shared areas of code. When you change the shared code, you get DW to regenerate all the static pages that use it. You can take the same approach yourself with a good text editor that lets you search/replace text over multiple files.

Really, though, I'd redefine the problem - shop around and find a host that'll let you do SSI and other server-side stuff. Hosting is so cheap these days that there's really no reason to labour under the constraints of free hosting.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Thanks. Yes, I meant enabled, or 10%, whichever you prefer.

--Chessbot

"See the TURTLE of enormous girth!"
-- Stephen King, The Dark Tower series
 
Thanks guys. I think we have reach the end of the dead end.

I only use JAvaScript for incedental fillips like telling the surfer it is the third Friday of the month - which they could work out for themselves - which from the feedback I get is a 10% deal probably.

I must say that I came to DW MX late so all my JS is hand coded and mostly original - but DW is a marvelous reference source even though I have the ginormous "Pure JavaScript" on my lap.

 
Do you have PHP or ASP at your disposal... both run server side, so there is no end user requirement...
 
sadly - no serverside. I guess I could but it would cost money, time and frustration - all for a small return. But when I get to an impasse I will take the plunge.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top