Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Dec 2002
    Location
    Central New York
    Posts
    87
    Thanks
    0
    Thanked 0 Times in 0 Posts

    SS-less Includes

    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?
    Timothy Boronczyk

  • #2
    New to the CF scene
    Join Date
    Jan 2003
    Location
    land of the buckeyes
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #3
    New Coder
    Join Date
    Dec 2002
    Location
    Central New York
    Posts
    87
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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?
    Timothy Boronczyk

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    Flint, Michigan, USA
    Posts
    629
    Thanks
    1
    Thanked 20 Times in 20 Posts
    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>

  • #5
    New Coder
    Join Date
    Dec 2002
    Location
    Central New York
    Posts
    87
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks.
    Timothy Boronczyk

  • #6
    Regular Coder
    Join Date
    Jun 2002
    Location
    Flint, Michigan, USA
    Posts
    629
    Thanks
    1
    Thanked 20 Times in 20 Posts
    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/


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •