HTML - Include
First off I hope this is going to the right category. If not sorry.
I would like to include this http://www.d2w-fv.com/includes/toolbar.htm on every page of my site w/o having to c/p the code on to each page. I have tried PHP includes and failed several times. Any suggestions? My Server is Go Daddy! if that helps. Similar TutorialsI'm a newbie and I need help with using the #include directive. below is a sample file usinging the #include directive: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Untitled</title> </head> <body> <!-- #include file="test.html" --> </body> </html> Here is the contents of test.html: <h1>header</h1> When I display the test.html in my brower the text show up. When I run the main file above with the include statement the contents of the test file will not appear. I've tried using #include virtual and I get the same results. both files reside in the same directory. How can I get the above files to work. I'm working with windows XP on a home computer. This problem occured in my actual website files becasue I want to include a header and a footer. These files of course have table tags etc in them and I get the same results where the include files contents do appear. I need help asap if that is possible. aaaaaaaaaaaaaaaaaaaaa Hi. Sorry if this is in the wrong section. I have made a menu http://www.checkpointdirect.co.uk/menu/mega3/ and it works. However, when I put... HTML Code: <?php include 'includes/mega3/menu.php'; ?> ...in the header.php file I get http://www.checkpointdirect.co.uk/ Any help would be great. Ignore the link names, there just example names. Thank you. Scott Trying to use this function i used the one it gives you in dreamweaver but it never seems to work. It will show in the preview on dreamweaver but when i run the .html file the content of the file that was included does not show. Here is what i used... Code: <!--#include file="PGS/DWNLDS.html" --> Any ideas of what i can do to get this to work? Thanks. Hi, I have a problem including a page to another. I'm using this code HTML Code: <!-- #include virtual="table.html" --> to add to my page, it work fine in the Dreamweaver. However, it doesn't work when i view in the browser. Lot of help I created a decent layout for a website using DIV layers with no problems. As the website is getting larger, adjusting certain elements on each page is very time consuming so today started using PHP includes. All I have done so far is change the file extension from .HTML to .PHP (I would later use the PHP include to pop the DIV layer with the menu onto a separate .PHP file to make it easier to add and edit it - had I have got that far ) I have changed none of the script on the file, only the extention, but one of my DIV layers has lost it's size and position (which was controlled by an external CSS).... Any ideas why it has done this? Thanks! what does this mean jdoc:include mean ? what tag is it ? <jdoc:include type="modules" name="menu" style="xhtml" /> thanks I've run into an article or three that show how to include headers, menus and other repetitive sections into my main html files. So I thought I'd try it out, following their examples,... and it's not working. I'm including the link to my test index.html. http://www.cubedspacedesigns.com/admosaic/ That boring red box is supposed to have some black text that comes from a header file. Here's the link to that. http://www.cubedspacedesigns.com/adm...es/header.html Am I typing things wrong, or am I supposed to install something on my server? Hey guys I have made a site but I have noticed a potential problem. I have about 10 pages and each page has the menu coded on it using css. If I wanted to change the style of the menu then thats easy as I have a external style sheet. If I want to add a link I would have to open up every page and add the link to each file. Is there a way I can create the menu in one file and include it in each page. So if I want to add a link I just add it to the one file and it would be updated on every page. Cheers Matt Wish You a very very Happy New year Hi Budies.... I have shtml files where i m using include files. Using this tag: <!--#include file="header.html"--> but the same tag is missing is some pages. please suggess me wat i do ? HELP ME ! I am trying to include a file on Onclick event on a button. But the code returns errors. Pls suggest. Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <script type="text/javascript"> function includefile() { <%@ include file="somefile.jsp" %>; } </script> </head> <body> <table> <tr> <td><input type="button" value="Click Here" onclick="includefile()"/></td> </tr> </table> </body> </html> I am starting to write a page for my site but I noticed that the <frame> attribute has been discontinued in HTML5. Since I am starting from scratch, I figured it best to try to stick to the current proper standards. So I guess i-frames is the best thing to do. I actually had the basic layout finished with using frames, only to realize they were depreciated, so I am switching to i-frames. The concept is pretty easy/generic. Example : http://img32.imageshack.us/img32/8662/diagram2q.jpg It consists of a header and two i-frames side by side. The i-frames have me stumped as I can not seem to get them to play nicely an appear side by side. Here is the source of the page: PHP Code: <? if (!check_perms('users_mod')){ error(403); } ?> <table border="0" width="100%" height="100%"> <tr align="center" valign="top"> <? show_header('Staff Tools', 'toolbox'); ?> </tr> </table> <div class="menu"> <iframe height="100%" width="15%" style="display:inline" src="/index2.php"></iframe> </div> <div class="content"> <iframe height="100%" width="85%" style="display:inline" src="/sections/admincp2/info.php"></iframe> </div> #menu { width: 200px; float: left; } #content { float: right; margin-left: 200px; } #menu iframe, #content iframe { width: 100%; } <? ?> At this point it generates the header, but just a blank white page below it. If I click view source, I can see it is trying to load the 2 i-frames. If I remove the tables,divs, and other styling info, then everything shows up but the i-frames still will not show side by side properly. Hi guys, I have a problem with HTML I've not experienced before relating to include files. I'm running IIS on Windows XP Pro and have an HTML file with a single include (this isn't the actual project I'm working on but a test I picked up off the web to demonstrate the problem) Test.html: - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 strict//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> </head> <body> <!--#include file="testinc.htm"--> <br>To see this work. </body> </html> Testinc.htm: - ************************************************** ***** This is a test ************************************************** ***** When I open, in IE, http://localhost/test.html all I see is the text "to see this work". If I view the source, it is identical to test.html (ie, the include is in the source which would signify to me that it's been picked up as a comment). I've tried replacing Include File with Include Virtual (not that it should make any difference in this case as they're both located in wwwroot) but to no avail. Any ideas what's missing? Cheers in advance. I'm currently building a website for my jewelry and I have run into a simple, but aggravating problem. Should I include a back button? A back button would be the same a clicking on home, but are my visitors going to to know that? This is what it would look like with out a back button: http://i91.photobucket.com/albums/k3...backbutton.gif This is what it would look like with the back button: http://i91.photobucket.com/albums/k3...backbutton.gif Ok, I have a fantasy football site going, and on the NFL Draft page, I want to display the order for the teams for all 7 rounds. You'll see round 1, complete he http://pzpff.pzproductions.com/nfldraft What I want to do is make it so that I can make this: <!--#include txt="round1.txt" --> then for each round switch it out with that rounds text document... all the way up to 7... <!--#include txt="round2.txt" --> <!--#include txt="round3.txt" --> <!--#include txt="round4.txt" --> <!--#include txt="round5.txt" --> <!--#include txt="round6.txt" --> <!--#include txt="round7.txt" --> Do I have to do this with php, or is there a way to do it with html? Is it possible that the inclusion of a script on a page be conditional to the web server that it's on? Example: if(the page is on Web Server 1) { Include Script 1 } else if(the page is on Web Server 2) { Include Script 2 } I'm working on several Google Maps web pages (10-12 at a time). I test the pages on our development web server and then move them to our public web server. The problem is that there is a different Google Maps Key for each web server that must be included on the web page. Right now, I have to comment out one and uncomment the other every time I copy these pages from one server to the other. Example of GM Key on Web Server 1: <script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAADCKg1uyd0NtoV0-TYT13MBROYM5OA_GDIvgonnUJTWljoaMDChT_7EqrLEb8A0mLzFhHNCgkaMCUIw" type="text/javascript"></script> Example of GM Key on Web Server 2: <script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA2Aa0y9qM0iE5-qtohbB_BBR7Dq-sN_oqy05rIf4WVBwd942bvhSeBq4siSIiJWbTtlmDhuk0aADGRA" type="text/javascript"></script> Is it possible that the inclusion of a script on a page be conditional to the web server that it's on? if(the page is on Web Server 1) { Include Script 1 } else if(the page is on Web Server 2) { Include Script 2 } I'm working on several Google Maps web pages (10-12 at a time). I test the pages on our development web server and then move them to our public web server. The problem is that there is a different Google Maps Key for each web server that must be included on the web page. Right now, I have to comment out one and uncomment the other every time I copy these pages from one server to the other. Example of GM Key on Web Server 1: <script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAADCKg1uyd0NtoV0-TYT13MBROYM5OA_GDIvgonnUJTWljoaMDChT_7EqrLEb8A0mLzFhHNCgkaMCUIw" type="text/javascript"></script> Example of GM Key on Web Server 2: <script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA2Aa0y9qM0iE5-qtohbB_BBR7Dq-sN_oqy05rIf4WVBwd942bvhSeBq4siSIiJWbTtlmDhuk0aADGRA" type="text/javascript"></script> Hello there! I hope any HTML expert can assist me on the following matter: I am trying to place some rotating ads on my website. Those ads are located on the "ads.php" file. If my website was written in php I would know how to call that file with the function: <?php include("ads.php"); ?> Unfortunately, my website is in HTML (cannot be changed to PHP for other reasons) and I don't know any HTML function equivalent to the INCLUDE function for PHP. Does anyone know how could I call the ads.php file in HTML? Thank you! Dear Members: I have a funny problem. I have two html files. I am trying to use test2.html as an Include file inside test1.html. I am not having any luck test1.html file reading test2.html. Test1.html code --------------------- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title> Your Title Here </title> <meta name="Generator" content="Alleycode HTML Editor"> <meta name="Description" content="Your description here..."> <meta name="Keywords" content="Your keywords here..."> </head> <body> <h1>This is my n include 1</h1> <h2>This is my n include 2</h2> <!--#include virtual="test2.html"--> </body> </html> test2.html code <h1>This is my include 3</h1> <h2>This is my include 4</h2> What I expect to see in the browser: This is my include 1 This is my include 2 This is my include 3 This is my include 4 But I see only This is my include 1 This is my include 2 It seems like the test2.html file is completely being ignored. May be it is a simple issue. But I tried everything. Both files reside on the same directory. If anybody could give me a suggestion, I shall truly appreciate it. As they say "It is driving me nuts"... Please help. |