HTML - Include A Template File Inside Html Page
If you want to include a template file how do you do that inside a html page? I want to include a footer.dwt file inside my html file......
I want to implement the footer.dwt file for all the pages of website....so i just want to call the footer.dwt file below my html page...... Help? Similar TutorialsGreetings I don't understand php at all and i have page in HTML. Now i have this guestbook script that i would really much like to add to the html page, so what now? My apache server can handle php and everything in the server end is right, but when i put this in to my html page: include($path."comment.php"); Nothing happens, now i suspect that i need to turn the whole page in to PHP. However i don't know how to do this, could anyone tell me how do i turn this page to PHP and get it to work? What is the code i need to put in to my html page? Please help this is important to me, thank you inadvance! Turhamuro I have to develop a page which have same frame and different content. Example http://www.dcu.org My page should have 3 columns where as DCU have 2. The content should look same across all browsers, The page may be used for 10inches to 30inches screens. What is the strategy to develop such page. The page must occupy 100% of screen ad should not have scrolebars. What is the strategy to display the content? I am using Tables but not sure how to make the content adjust according the screen. I am looking to develop a template and can be used to all the content. Please help me figure out the strategy. Regards, Swaroop Kunduru. Hi, I'm trying to include one HTML file in another. I tried iframe and was displeased with the results, I want the size of the frame to change dynamically and not just scroll. Fair warning, my knowledge of JavaScript is non-existent >_> . Basically, I have a document written in HTML (please don't suggest a wholesale re-write, that's simply not practical) and the idea is to have one file where it makes sense to include it several times. One thing to mention, this document is not meant to be shown on a web-server, but in a browser while you're reading it off your hard-drive. Here's what I have so far. main.shtml Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>test</title> </head> <body> <center> <h1> This is only a test! </h1> </center> <p> Still testing!!!!! </p> <!-- #include file="included.html" --> <p> Even more testing!!!!! </p> </body> </html> included.html Code: <!--<html> <head> <title> asdfasdfasdfasd </title> </head> <body>--> <p> <h4> foobar </h4> <br> <br> <br> <br> <h4> boofar </h4> </p> <!--</body> </html>--> Not sure what I'm doing wrong, help appreciated! I have a site with a nav bar. http://www.groundzerostudios.co.nr/ It is a lot of work to go to each individual site to update the nav bar. I was wondering if i could save the nav bar to a seperate file and open it in each site. That way if i update the nav bar once, the sites will all call on the new nav bar. Here is the nav bar code ?////////////// HTML Code: <p> <fieldset> <legend> <b>Links:</b> </legend> <table border="0"> <tr> <td><FORM name="homeform"> <SELECT name="gamelinks" onChange="window.location=document.homeform.homelinks.options[document.homeform.homelinks.selectedIndex].value"> <OPTION SELECTED value="H:\Wamboldt's Folder\webdesign.html">--Main-- <OPTION value="H:\Wamboldt's Folder\index.html">Home </SELECT> </FORM></td> <td><FORM name="gameform"> <SELECT name="gamelinks" onChange="window.location=document.gameform.gamelinks.options[document.gameform.gamelinks.selectedIndex].value"> <OPTION SELECTED value="H:\Wamboldt's Folder\webdesign.html">--Game Design-- <OPTION value="http://groundzerogames.110mb.com/gamehome.htm">Home <OPTION value="http://groundzerogames.110mb.com/games.htm">Games <OPTION value="http://groundzerogames.110mb.com/wip.htm">W.I.Ps <OPTION value="http://groundzerogames.110mb.com/service.htm">Services </SELECT> </FORM></td> <td><FORM name="webform"> <SELECT name="weblinks" onChange="window.location=document.webform.weblinks.options[document.webform.weblinks.selectedIndex].value"> <OPTION SELECTED value="http://groundzerogames.110mb.com">--Web Design-- <OPTION value="http://groundzerogames.110mb.com/gamehome.htm">Home <OPTION value="http://groundzerogames.110mb.com/games.htm">Portfolio <OPTION value="http://groundzerogames.110mb.com/wip.htm">Help <OPTION value="http://groundzerogames.110mb.com/service.htm">Services </SELECT> </FORM></td> <td><FORM name="helpform"> <SELECT name="helplinks" onChange="window.location=document.helpform.helplinks.options[document.helpform.helplinks.selectedIndex].value"> <OPTION SELECTED value="http://groundzerogames.110mb.com">--Courses-- <OPTION value="http://groundzerogames.110mb.com/gamehome.htm">Home <OPTION value="http://groundzerogames.110mb.com/games.htm">Game Design <OPTION value="http://groundzerogames.110mb.com/wip.htm">Web Design </SELECT> </FORM></td> <td><FORM name="tutform"> <SELECT name="tutlinks" onChange="window.location=document.tutform.tutlinks.options[document.tutform.tutlinks.selectedIndex].value"> <OPTION SELECTED value="http://groundzerogames.110mb.com">--Assistance-- <OPTION value="http://groundzerogames.110mb.com/gamehome.htm">Tutorials <OPTION value="http://groundzerogames.110mb.com/games.htm">Help <OPTION value="http://groundzerogames.110mb.com/service.htm">Request </SELECT> </FORM></td> <td><FORM name="contform"> <SELECT name="contlinks" onChange="window.location=document.contform.contlinks.options[document.contform.contlinks.selectedIndex].value"> <OPTION SELECTED value="http://groundzerogames.110mb.com">--Contact Us-- <OPTION value="http://groundzerogames.110mb.com/gamehome.htm">Email <OPTION value="http://groundzerogames.110mb.com/games.htm">Telephone <OPTION value="http://groundzerogames.110mb.com/service.htm">Mail </SELECT> </FORM></td> <td><FORM name="newsform"> <SELECT name="newslinks" onChange="window.location=document.newsform.newslinks.options[document.newsform.newslinks.selectedIndex].value"> <OPTION SELECTED value="http://groundzerogames.110mb.com">--News-- <OPTION value="http://groundzerogames.110mb.com/gamehome.htm">Recent <OPTION value="http://groundzerogames.110mb.com/games.htm">Archives <OPTION value="http://groundzerogames.110mb.com/service.htm">Submit </SELECT> </FORM></td> </tr> </table> </fieldset> </p> ?//////////// hi everyone this is my first page so i will probably have a couple of questions to help give me an idea of how to do that i want! basically someone has asked me to design them a site, i did a web design course but that was 6 months ago and i need to learn new things for it as well as try and remember what ive learned! ive got a semi basic layout, ill post the html and css, hopefully ill pate them in the right way (this definitely wont be the colour scheme, ive been following an online tutorial, want to get the layout right before making other tweaks) basically in the content section theyre looking for a rectangular box that has 4 imaes, 2 side by side and two below. these will change when theyre rolled over and when a particular image is clicked it will take them to the correct section of the site. as far as i understand from the css i have the size of the content section will change depending on how much information is there. how would i know what size to make the flash for insertion into this section so it fits properly without any gaps? sorry im a bit new to this but the more i learn the better! i dont have a clue how to actually code the flash yet but getting the size right would be a good start! thanks for your help HTML Code: <link rel="stylesheet" type="text/css" href="css/master.css" /> </head> <body> <div id="page-container"> <!--this div will hold all the other elements of the page--> <div id="main-nav">Main Nav</div> <div id="header"> <h1> Kilmaclolm Dramatic Society logo to be placed here </h1> </div> <div id="sidebar-a"> <dl class="hidden"> <dt id="about"><a href="#">About</a></dt> <dt id="services"><a href="#">Services</a></dt> <dt id="portfolio"><a href="#">Portfolio</a></dt> <dt id="contact"><a href="#">Contact Us</a></dt> </dl> </div> <div id="content"> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam gravida enim ut risus. Praesent sapien purus, ultrices a, varius ac, suscipit ut, enim. Maecenas in lectus. Donec in sapien in nibh rutrum gravida. Sed ut mauris. Fusce malesuada enim vitae lacus euismod vulputate. Nullam rhoncus mauris ac metus. Maecenas vulputate aliquam odio. Duis scelerisque justo a pede. Nam augue lorem, semper at, porta eget, placerat eget, purus. Suspendisse mattis nunc vestibulum ligula. In hac habitasse platea dictumst. </div> <div id="footer"><!--floated divs dhould come first to avoid any IE issues--> <div id="altnav"> <a href="#">About</a> - <a href="#">Services</a> - <a href="#">Portfolio</a> - <a href="#">Contact Us</a> - <a href="#">Terms of Trade</a> </div> Copyright © Kilmacolm Dramatic Society. A website by D Keenan </div> </body> </html> Code: @charset "utf-8"; /* CSS Document */ html, body { /*resets the margins and padding on both the html and body tags to 0 to ensure theres no space between the top of the browser and the top of the page */ margin: 0; padding: 0; } h1 { margin: 0; /* takes away the default margin and padding on h1 tags */ padding: 0; } .hidden { display: none; /* any element with this class wont be seen on the site */ } #page-container { /* there is a # as this is an id, to be used once on the page only, not repeated elsewhere this div's height will change depending on the content*/ margin: auto; /* browser sets margin, should centre the div */ width: 760px; /* sets the width of the container */ } #main-nav { background: red; height: 50px; /* the width doesnt need to be specified, it will be 760px as this is the with of the containing div */ } #header { background: blue; height: 150px; } #sidebar-a { float: left; /* floats sidebar to left of the screen */ background: darkgreen; /*the height is dependend on the content so no height will be set for the time being*/ width: 280px; } #content { background: green; /*the height is dependend on the content so no height will be set for the time being*/ margin-left: 280px; /*creates a margin as wide as the sidebar to separate the sidebar information and the content */ } #footer { clear:both; /*When an element has the clear property assigned, if it comes into contact with a float it is placed right below where that float ends.*/ background: orange; height: 66px; } Hi. My latest project is a website that I plan to update via a vBulletin "back end" I wanted to do this via RSS feeds from the forums. What I am trying to do is have it so I can put ONLY the data from a single forum post inside a HTML page, that will then update as I update the forum post. I have started reading up a little and found that vBulletin offers the following methods: -XML -RSS -RSS1 -RSS2 All of them methods appear to pull data that I do not need/want (posted by, date, time, link to the post). I literally JUST want the data from inside the post to be inserted in to the HTML page. Besides that, I am unsure of how to add the actual data to the web page. Looking for a simple (if possible) guide on how to do this. I will be formatting the data via. .CSS Could anyone point me in the right direction? thx. I'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. hii... i had made an template and place all my code inside it it is running fine but the button is not getting near to the image can u help me with that or tell me how to do it ....and i had used software to convert template from powerpoint with a software called ppt2 flash standard and it has it logo of that website on the buttom of my template how to remove it !! HTML Code: <html> <head> <title>U Compare</title> <script><!-- var Clicks = 0 ; function AddClick(){ Clicks = Clicks + 1; document.getElementById('CountedClicks').innerHTML = Clicks + ' votes'; } // --></script> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <script language="javascript" src="swf.js"></script> <title> compare</title> <!-- saved from url=(0014)about:internet --> </head> <body bgcolor="#999999"> <span id="CountedClicks">0 vote</span><br> <button style="background-color:white" onclick="AddClick()">vote</button> </body> <script language="javascript"> <!-- function getSlideIndex() { var strUrl = document.location.href; if (strUrl.indexOf('?') == -1 || strUrl.indexOf('=') == -1) { return 0; } return strUrl.substring(strUrl.indexOf('=') + 1, strUrl.length); } //--> </script> <body> <center> <table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%"> <tr> <td width="100%" height="100%" align="center" valign="center"> <script language="javascript"> writeSwf("compare.swf?slideIndex=" + getSlideIndex(), "100%", "100%"); </script> </td> </tr> <tr> <td style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px; color: silver;" align="right"> <span class="style1">Powered by Wondershare <a style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px; color: silver" href="http://www.wondershare.com/pro/ppt2flash-standard.html">PPT2Flash Standard</a></span></td> </tr> </table> </center> <!-- begin htmlcommentbox.com --> <div id="HCB_comment_box"><a href="http://www.htmlcommentbox.com">your opinion box</a> is loading comments...</div> <link rel="stylesheet" type="text/css" href="http://www.htmlcommentbox.com/static/skins/simple/skin.css" /> <script type="text/javascript" language="javascript" id="hcb"> /*<!--*/ if(!window.hcb_user){hcb_user={};} (function(){s=document.createElement("script");s.setAttribute("type","text/javascript");s.setAttribute("src", "http://www.htmlcommentbox.com/jread?page="+escape((window.hcb_user && hcb_user.PAGE)||(""+window.location)).replace("+","%2B")+"&opts=406&num=10");if (typeof s!="undefined") document.getElementsByTagName("head")[0].appendChild(s);})(); /*-->*/ </script> <!-- end htmlcommentbox.com --> </body> </html> Hi, My problem is the following: i would integer in a page of my website the data from a xml page of another website. i try to integer this sport ranking in my site : http://www.lffs.org/Page/PA4G_Class.xml). The use of an iframe is a solution. but the style of this table isn't suitable. In other words, i try to extract the date of the table and insert it in another table to which i can apply a css-sheet. Is-it possible? Thanks in advance. Julien Hi, However, many of thesystems can work with embedded images, media files and so can any one show an example of a simple PDF file embedded within a HTML page? Hi there in new here so please be nice haha ok i want a Mp3 file which is located in the same directory as my web page file to play in the background of my web page saved on my computer. i have tried loads of different codes, but to no success. I am using firefox browser 3.0.9 version. I created the html webpage using notepad. I have installed apple's quicktime as this website said so: http://kb.mozillazine.org/Background...doesn%27t_play Here is my code, please could somebody tell me where i am going wrong: Code: <html> <head> <title>My webpage!!!!!!!!!</title> </head> <body> <object data="music.mp3" type="application/x-mplayer2" width="0" height="0"> <param name="florida.mp3" value="music.mp3"> <param name="autostart" value="1"> <param name="playcount" value="true"> </object> </body> </html> Any help would be great many thanks and kind regards Jackie x Is it possible to reference a PDF file in a HTML page as one does with <img />? That is, when the page opens, the file will be displayed. Many thanks... Todd Hi all, I have a .CGI web page written in PERL language. The CGI script loads the information from a database. So when i start the CGI page in my browser and it will only have a value in the whole page. As in when the whole page started in the browser will have only a few characters. Let say it retrieve Temperature recorded and which is stored in the database. So the whole page when loaded will only show 1 temperature. Which is "36.6" and will change when ever the database receive a newer data. In additional, i have a html page. There are tables in the page whereby show information. Like tables having temperature, id, sound and light columns. My Question is that Am i able to load the numbers/characters show on the CGI page directly into the table or any where in the HTML page? What i can think of is putting up a link to the CGI page on the HTML file and click it when i want to view it.But it would just be too troublesome. Lastly, thank you all for your time in reading and please pardon me for my bad English and weak HTML skills as I'm still learning. Thanks & best regards Joseph Hello Everyone, Can someone guide me how can I open a word doc or text file from a html page. I already changed the following setting for doc files in my system: In Explorer - Click Tools --> Folder Options Click on File Types Goto any office extension (XLS, DOC, PPT,...) and uncheck Browse in Same Window. Here is my html file <html> <body> Hello <a href="c:\\myword.doc" target="_self">Link</a> </body> </html> The preferable way would be to govern it through coding, rather doing some manual settings in browser. Thanks. Hi All, Please Heeeeeeeeeeeeeeeeeeeeeeeeeeeellllllppp!!!!! Thanks in advanced!!! Have a few mistakes and / or something is missing below: Code: <html> <head>PLEASE FIND THE MISTAKE(S) or SOMETHING MISSING /</head> <script type="text/javascript"> window.onload=function() { document.getElementById('exampleletterList').onchange=function() { window.location=('http://www.example.org/'+this.value+''); } } </script> <body> <select id="exampleletterList"> <a target=\"_blank\" href=\"file.doc\" title=\"\">John Doe<br> XXXXXXXXXXX</br></a>. <option value=""><b> PLEASE SELECT THE FOLLOWING: <b/> </option><!--this option takes you to --> <body mar="0" marginheight="0" bgcolor="rgb(38,38,38)"> "BACKGROUND BLUE GREEN MARMOL " <embed width="100%" height="100%" name="plugin" src="http://www.example.pdf" type="application/pdf"> <br> <CENTER> <option value=index.htm>Option #1</option><!--this option takes you to --> <option value="example7">Option #2</option><!--this option takes you to --> <option value="example3">Option #3 </option><!--this option takes you to --> <option value="example4"><br>Option #4</br></option><!--this option takes you to --> <option value="example5">Option #5</option><!--this option takes you to --> <option value="example2">Option #6</option><!--this option takes you to --> <option value="blog/wp-login.php"><!--this option takes you to blog--> </select> </CENTER> </br> </body> <html xmlns:v="urn:schemas-microsoft-com:vml" xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz </body> </head> </html> Hi, I am trying to do some simple template stuff. Basically I have a bunch of sites(25+) that I need to update some things on. This time I'd like to template it so in the future it's easier. What I would like to do, in my html I would like to pull several things from a file on the server. 1 file that would have like: Sitelink1: Sitelink2: ContactEmail: Etc. Then pull that information and popit in the html where I want. I have been searching for a while, and all I have been able to find is a way to insert 1 file of content at a time. Im not even sure what to search for to pull certain fields from 1 file. Any help would be appreciated. Thanks I want to load a local html file in an IFrame. The main page is loaded from a remote site (http://www.mysite.com). How can I do that if I don't have a web server installed on the local machine? Is there any workaround? Thank you! Hello, I know a little bit about creating websites and how to use the programs that create them. And knowing this, is why I don't understand what I'm doing wrong. A friend of mine, gave me a website template with all its files. If I open firefox or any browser and goto open file, then select the .html file, it will load it just fine and it looks great. In the folder of the template are the following files: xzy1.fla xzy1.fla.jsfl xzy1.swf xzy1.html xzy1-b.jpg xzy1-h.jpg And that's it, nothing else is in the folder. As for how I use to create or edit other website templates, I would goto the folder of the template, and in it would be the following files: abc2.fla abc2.swf abc2_about.html abc2_index.html abc2_about.psd abc2_index.psd And there is also a 'image' folder with a lot of images. Normally to edit this template I would use the .psd file and either Adobe Photoshop and/or ImageReady to make my adjustments. Can someone please take the time to explain what other files I could use to make the adjustments. Because as I explained, the only way I thought you could edit a template was to use the .psd file. Thanks again for your time, Jason S 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. 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> |