View Full Version : SS-less Includes

01-07-2003, 12:17 AM
I know I can include information from external CSS or Javascript files, but I was wondering if there was a way to include external html information if my server does not support SSI, such as footers or menues that appear on every page. I did a little research and I came up with the following:


...text before...
<OBJECT data="embed_me.html">
Warning: embed_me.html could not be embedded.
...text after...

According to W3C I can use the object element to embed information. Unfortunately (as is the case with most web-standards) it doesn't work for me. I've even tried adding type="html/text" as an attribute to no avail.

Anyone run into this before and uncovered a solution?

01-07-2003, 06:14 AM
not my code, but i have used this about two years ago and it worked then. msie only if i recall though.

<object type="text/x-scriptlet" width="100" height="200" data="http://www.blahblahblah.com"></object>


01-07-2003, 03:35 PM
hrm... essentially the same code save for the type...

is there a listing of the different type values, such as css/text, mpeg/application, etc?

Also, what about the embed tag?

01-08-2003, 04:10 PM
If you are certain that your users all have JavaScript, you could put the outside information into .js files and then pull them in. An example .js file might be:

&nbsp;Head_Lines=new Array(
&nbsp;&nbsp;'This is line 1',
&nbsp;&nbsp;'Line 2',
&nbsp;&nbsp;'Final line has no ending comma'
&nbsp;for (i=0; i<Head_Lines.length; i++) {

Make it able to be referenced from each page:

&nbsp;<script src='head.js'></script>

01-09-2003, 02:31 AM
thanks. :)

01-09-2003, 12:46 PM
The above concept is used on every page at my site to display the you-are-here information, and on multiple pages to pull in other things specific to the individual pages. If you'd like to see it in action, come on over for a visit to: