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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jun 2012
    Posts
    3
    Thanks
    2
    Thanked 0 Times in 0 Posts

    How Do I Include One HTML File in Another?

    Title says the most.
    I'm having problems with including a html document in another.

    I tried the "<!--#include virtual="path to file:///something.html" -->", but the included html does not show up in the browser, nor in the live view part of Dreamweaver.

    Thanks in advance.

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <!-- TemplateBeginEditable name="doctitle" -->
    <title>Topside User Manual</title>
    <!-- TemplateEndEditable -->
    <script src="file:///link" type="text/javascript"></script>
    <link href="file:///link" rel="stylesheet" type="text/css" />
    <style type="text/css">
     
     
    #myoutercontainer { line-height:2em }
    #myoutercontainer2 { line-height:2em }
    #myoutercontainer3 { line-height:2em }
    #myoutercontainer4 { line-height:2em }
    #myoutercontainer5 { line-height:2em }
     
     
    body #outer {
      position: absolute;
      top: 50%;
      left: 0px;
      width: 100%;
      height: 1px;
      overflow: visible;
    }
     
     
    body,td,th {
              font-family: Tahoma, Geneva, sans-serif;
              font-size: 10px;
              color: #000;
    }
     
     
    h1 {
              font-size: 14px;
    }
     
     
     
     
    </style>
    </head>
     
     
    <body>
     
     
    <p id="myoutercontainer">
    <p id="myoutercontainer2">
    <p id="myoutercontainer3">
    <p id="myoutercontainer4">
    <p id="myoutercontainer5">
     
     
    <div align="center">
     
     
    <img src="file:///link" width="960" height="86" border="0" usemap="#Map" />
    <map name="Map" id="Map">
    <area shape="rect" coords="-2,-3,215,86" href="http://www.google.com/" />
    <area shape="rect" coords="776,31,914,55" href="#" />
    </map>
     
     
    <ul id="MenuBar1" class="MenuBarHorizontal">
        <li><a class="MenuBarItemSubmenu" href="#">Topside dep</a>
          <ul>
            <li><a href="http://www.google.com/">Organization</a></li>
            <li><a href="#">Responsibility</a></li>
            <li><a href="#">Employees</a></li>
            <li><a href="#">Package Lead</a></li>
            <li><a href="#">Activity Lead</a></li>
          </ul>
        </li>
        <li><a href="#" class="MenuBarItemSubmenu">Sales support</a>
          <ul>
            <li><a href="#" class="MenuBarItemSubmenu">Studies</a>
              <ul>
                <li><a href="#">CTR catalouge</a></li>
                <li><a href="#">Typical Documents</a></li>
                <li><a href="#">Presentations</a></li>
                <li><a href="#">Photo library</a></li>
              </ul>
            </li>
            <li><a href="#" class="MenuBarItemSubmenu">FEED</a>
              <ul>
    <li><a href="#">FLYT overview</a></li>
    <li><a href="#">SOS</a></li>
    <li><a href="#">WBS</a></li>
                <li><a href="#">Project plan</a></li>
                <li><a href="#">Item List/BOM</a></li>
                <li><a href="#">CPY spesific</a></li>
                <li><a href="#">FE spesifications</a></li>
                <li><a href="#">Risk evaluation</a></li>
                <li><a href="#">Cost calculation</a></li>
    </ul>
            </li>
    </ul>
        </li>
        <li><a class="MenuBarItemSubmenu" href="#">Engineering</a>
          <ul>
            <li><a href="#" class="MenuBarItemSubmenu">Basic engineering</a>
              <ul>
                <li><a href="#">SDL</a></li>
                <li><a href="#">MDR</a></li>
                <li><a href="#">QA Plan/ITP</a></li>
    </ul>
            </li>
            <li><a href="#" class="MenuBarItemSubmenu">Detailed engineering</a>
              <ul>
                <li><a href="#">Design Review</a></li>
                <li><a href="#">Document Review</a></li>
                <li><a href="#">Interfaces</a></li>
                <li><a href="#">Tag List</a></li>
                <li><a href="#">Spare Parts</a></li>
    </ul>
            </li>
            <li><a href="#" class="MenuBarItemSubmenu">Technical Safety/HSE</a>
              <ul>
                <li><a href="#">Fire Rating</a></li>
                <li><a href="#">Safety Signs</a></li>
                <li><a href="#">Sound Level</a></li>
                <li><a href="#">Light Level</a></li>
                <li><a href="#">Safety Plot Plan</a></li>
                <li><a href="#">Chartek</a></li>
                <li><a href="#">Passive Fire Protection</a></li>
              </ul>
            </li>
          </ul>
        </li>
        <li><a href="#" class="MenuBarItemSubmenu">Procurement</a>
          <ul>
            <li><a href="#" class="MenuBarItemSubmenu">Purchase</a>
              <ul>
                <li><a href="#">Release Items in TC</a></li>
                <li><a href="#">AX</a></li>
                <li><a href="#">Purchase</a></li>
              </ul>
            </li>
            <li><a href="#" class="MenuBarItemSubmenu">Production</a>
              <ul>
                <li><a href="#">Nortification</a></li>
                <li><a href="#">Equipment MC</a></li>
                <li><a href="#">QA Reports</a></li>
                <li><a href="#">Production</a></li>
              </ul>
            </li>
          </ul>
        </li>
        <li><a href="#" class="MenuBarItemSubmenu">Hors&oslash;y</a>
          <ul>
            <li><a href="#" class="MenuBarItemSubmenu">Assembly</a>
              <ul>
                <li><a href="#">Installation meeting</a></li>
                <li><a href="#">Receiving inspection</a></li>
                <li><a href="#">Procedures/drawings</a></li>
                <li><a href="#">Bolt calculations</a></li>
                <li><a href="#">Assembly MC</a></li>
                <li><a href="#">As built doc.</a></li>
              </ul>
            </li>
            <li><a href="#" class="MenuBarItemSubmenu">Testing</a>
              <ul>
                <li><a href="#">FAT</a></li>
                <li><a href="#">Commisioning</a></li>
                <li><a href="#">SIT</a></li>
                <li><a href="#">Testloop Hors&oslash;y</a></li>
    </ul>
            </li>
          </ul>
        </li>
        <li><a href="#" class="MenuBarItemSubmenu">Delivery</a>
          <ul>
            <li><a href="#">Weightning</a></li>
            <li><a href="#">Packing Preservation</a></li>
            <li><a href="#">Hand over</a></li>
            <li><a href="#">Transportation</a></li>
            <li><a href="#">Install action</a></li>
            <li><a href="#">Offshore Com.</a></li>
    </ul>
        </li>
      </ul>
     
     
     
    <!--#include virtual="path to file:///link" -->
     
     
    <table width="960px" height="48px" background="file:///link" cellpadding="5" cellspacing="0">
    <tr>
    <td valign="center">
    <font color="#000000">
                 Last edited by: <a href="mailto:mail@mail.com">Name</a>
    </font>
    </td>
    </tr>
    </table>
    <map name="Map2" id="Map2">
      <area shape="rect" coords="854,-4,962,49" href="webpage" />
    </map>
     
     
    <p>
    <script type="text/javascript">
     
     
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
     
     
    var domainroot="www.javascriptkit.com"
     
     
    function Gsitesearch(curobj){
    curobj.q.value="site:"+domainroot+" "+curobj.qfront.value
    }
     
     
    </script>
    </p>
    </body>
    </html>

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,728
    Thanks
    6
    Thanked 1,015 Times in 988 Posts
    Read up on SSI, again (if you’ve done at all). You can’t view SSI in the browser from the file system, you need to put it on a webserver (that’s why it’s called server-side includes). And you must rename your HTML files to .shtml (unless you change that in a server setting).

  • #3
    Regular Coder
    Join Date
    Aug 2005
    Location
    MS
    Posts
    841
    Thanks
    11
    Thanked 79 Times in 77 Posts
    Quick and dirty:
    Code:
    <div id="wrap"><object type="text/html" data="something.html"></object></div>
    Make sure relative path is correct and not to a path on your hard drive.
    ☠ ☠RON☠ ☠

  • #4
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,380
    Thanks
    11
    Thanked 592 Times in 572 Posts
    if you have dreamweaver, use its "library item" or template features to embed files withing files.
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/9/03) IE7:0.1, IE8:4.6, IE11:9.1, IE9:3.1, IE10:3.0, FF:17.2, CH:46, SF:11.4, NON-MOUSE:38%


  •  

    Posting Permissions

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