...

View Full Version : SS-less Includes



bluephoenix
01-07-2003, 01: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:

http://www.w3.org/TR/html401/struct/objects.html#h-13.5

...text before...
<OBJECT data="embed_me.html">
Warning: embed_me.html could not be embedded.
</OBJECT>
...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?

BIATCHabutuka
01-07-2003, 07: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>

enjoy.

bluephoenix
01-07-2003, 04: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?

jalarie
01-08-2003, 05: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;...,
&nbsp;&nbsp;'Final line has no ending comma'
&nbsp;);
&nbsp;
&nbsp;for (i=0; i<Head_Lines.length; i++) {
&nbsp;&nbsp;One_Line=Head_Lines[i];
&nbsp;&nbsp;document.write(One_Line);
&nbsp;}

Make it able to be referenced from each page:

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

bluephoenix
01-09-2003, 03:31 AM
thanks. :)

jalarie
01-09-2003, 01: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:

&nbsp;http://spruce.flint.umich.edu/~jalarie/



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum