how do you reference to a external .html file to place it into multiple pages?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MusoFreak200
    New Member
    • Oct 2009
    • 96

    #1

    how do you reference to a external .html file to place it into multiple pages?

    how do you reference to a external .html file to place it into multiple pages?

    just the same as .css files?
  • Niheel
    Recognized Expert Moderator Top Contributor
    • Jul 2005
    • 2433

    #2
    You can only reference external .html files by using iframes.

    Code:
    <IFRAME SRC="recipe.html" TITLE="The Famous Recipe">
    
    </IFRAME>
    niheel @ bytes

    Comment

    • MusoFreak200
      New Member
      • Oct 2009
      • 96

      #3
      Originally posted by kub365
      You can only reference external .html files by using iframes.

      Code:
      <IFRAME SRC="recipe.html" TITLE="The Famous Recipe">
      
      </IFRAME>
      that didn't work,

      what i am trying to place in an external .html file is this code...

      Code:
      <!-- THE START OF THE BODY SECTION FOR NAVIGATION BAR CODE -->
      
      <div class="chromestyle" id="chromemenu">
      <ul>
      <li><a href="index.html"><font size="3">Home</font></a></li>
      <li><a href="completed_kitchens.html" rel="dropmenu1"><font size="3">Photo Gallery</font></a></li>
      <li><a href="3d_photos.html"><font size="3">3D Picture Gallery</font></a></li>
      <li><a href="links.html" rel="dropmenu2"><font size="3">Links</font></a></li>
      <li><a href="contact_me.html"><font size="3">Contact Me</font></a></li>	
      </ul>
      </div>
      
      <!--1st drop down menu -->                                                   
      <div id="dropmenu1" class="dropmenudiv">
      <a href="kitchen_blacksmiths.html">Blacksmiths</a>
      <a href="kitchen_dudley.html">Dudley</a>
      <a href="kitchen_kahibah.html">Kahibah</a>
      <a href="kitchen_merewether.html">Merewether</a>
      <a href="kitchen_toronto.html">Toronto</a>
      <a href="kitchen_willoughby.html">Willoughby</a>
      </div>
      
      
      <!--2nd drop down menu -->                                                
      <div id="dropmenu2" class="dropmenudiv" style="width: 150px;">
      <a href="http://www.edstein.com.au">Edstein</a>
      <a href="http://www.wk.com.au">Quantum Quartz</a>
      <a href="http://www.integralglass.com.au">Integral Glass</a>
      <a href="http://www.lincolnsentry.com.au">Lincoln Sentry</a>
      <a href="http://www.nover.com.au">Nover</a>
      <a href="http://www.winningappliances.com.au">Winning Appliances</a>
      <a href="http://www.polytec.com.au">Polytec</a>
      <a href="http://www.form-tek.com.au">Form-Tek</a>
      <a href="http://www.formica.com.au">Formica</a>
      <a href="http://www.blum.com.au">Blum</a>
      </div>
      
      
      
      
      <script type="text/javascript">
      
      cssdropdown.startchrome("chromemenu")
      
      </script>
      
      <!-- THE END OF THE BODY SECTION FOR THE TOP NAVIGATION BAR CODE -->
      is it possible to do that the same as you would for a css layout?

      sorry.
      i just haven't been able to find out how.

      thanks in advance

      Comment

      • Niheel
        Recognized Expert Moderator Top Contributor
        • Jul 2005
        • 2433

        #4
        Nope you can't, you'd have to use a serverside language like PHP.
        niheel @ bytes

        Comment

        • Banfa
          Recognized Expert Expert
          • Feb 2006
          • 9067

          #5
          Or if they are enabled you could use a server side include, but I have heard that php is quicker.

          Comment

          • jamwil
            New Member
            • May 2009
            • 13

            #6
            Ya if you have it php works wonderfully.

            Code:
            <?php include("filename.html"); ?>

            Comment

            • MusoFreak200
              New Member
              • Oct 2009
              • 96

              #7
              Originally posted by jamwil
              Ya if you have it php works wonderfully.

              Code:
              <?php include("filename.html"); ?>
              thanks jamwil..

              Comment

              Working...