HTML - Question About Including External Html File
Hi
I use an include to display an exteral html file in a div. If I strip the html file of all the header formatting, it displays fine. As soon as I add the header info, transitional info etc, it adds a couple of blank line breaks to the top of the text dsiplayed in the external div. here's the link:www.mcbub.com How do I make it so the text starts at the top? thanks in advance! Similar TutorialsHi I use an include to display an exteral html file in a div. If I strip the html file of all the header formatting, it displays fine. As soon as I add the header info, transitional info etc, it adds a couple of blank line breaks to the top of the text dsiplayed in the external div. How do I make it so the text starts at the top? Cheers Shaun ok so to start off if I ask any dumb questions my apologizes. I have just started writing HTML code. I have done quite a bit of C++ but its been years and html is much different. Well here is my question I have made a dynamic sidebar for my webpages so I can cut out all those blocky link buttons at the top of the page. So I created an external html file and wrote the code for the side bar, but I can't figure out how to get it into my webpage html files. I am sure its something minor but I can't seem to figure it out. I have been able to get it on the page by using iframe but I really don't like iframe. One of the really big things is I want it locked to the right side of the browser screen so if you scroll it stays there. Also it needs to float above everything else so it will open on top of the webpage and no disrupt the content. I am sorry if this is a simple thing but I have spent 2 days reading everything I can on it and can't get it to work. I have tried it as a PHP file with include command. I tried link didn't work also. I know I could just include all the code on the pages but I am trying to learn how to use template correctly so as to make my pages as clean and SE friendly as possible. Last thing if I need to post some of the code up here to help I can do that. Well thanks in advance, this will make my day if I get this dang side bar to work. Thanks J Is it possible to include a header and footer file using HTML? I have my file as a .html and need to be able to include the HTML for the header and footer. Anyone know how I can do this? Is it possible to include a header and footer file using HTML? I have my file as a .html and need to be able to include the HTML for the header and footer. Anyone know how I can do this? Hi guys, I have a div on my page, which essentially just places a layer/table over the entire page and displays a "LOADING..." message, then promptly disappears when everything hidden beneath it has finished loading. I want to use this same div in several other pages, so I thought the best way would be to place it in an external file, then simply call it when required. Can someone please tell me how I can do this, i.e. what code I need to place in my HTML script to call an external div? I apologise if this is an obvious newbie-style question! But I appreciate any help that anyone out there can give me. Thanks in advance, Kate. Is it possible to embed a file into a notepad html page (I am not online yet, as I am still learning) and have it open with a specified EXE program>? An example. Pretend I wrote a basic file (old school gwbasic, lets call it basic.bsc) and wanted to attach it just like a URL, so when I click on the words "A cool looking file", it would open the program. The problem is, the person i intended to view the file doesn't have the appropriate program. So, I have added the program to view the file into the folder in which the basic.bsc file was located. I know another text file would be <a href="basic.html"></a> Is there similar for my specified predicament? Hi. Thanks in advance. I'm obviously still a beginner. I'm looking to add an "upload file" section to a formail script I have setup. I don't need any of the security, and bells and whistles for now. I will take take care of that once I get this initially setup. I understand that I would use this code in the form fields; <p>File to upload: <input type="file" name="first_file" /></p> <p>File to upload: <input type="file" name="second_file" /></p> I just don't know what to put in the beginning of the script to match this upload code form field. Here's the code for the formail I have so far. HTML Code: <form method="POST" action="http://old-wizard.com/cgi-sys/FormMail.cgi" target="_top"> <INPUT TYPE="HIDDEN" NAME="recipient" VALUE="info@maybrookvending.com"> <INPUT TYPE="HIDDEN" NAME="subject" VALUE="WebSite Contact"> <INPUT TYPE="HIDDEN" NAME="redirect" VALUE="http://maybrookvending.com/thanks.htm"> <INPUT TYPE="HIDDEN" NAME="required" VALUE="email,email_confirm,your_name"> <INPUT TYPE="HIDDEN" name="sort" value="through,regarding,your_name,employees,phone,company_name,email,email_confirm,comments"> <TABLE BORDER="0" cellpadding="1" cellspacing="0" width="100%"> <TR><TD> Name:<br> </TD></TR><TR><TD> <INPUT TYPE="TEXT" NAME="your_name" SIZE="30" class="shadeform"><br> </TD></TR><TR><TD> Company:<br> </TD></TR><TR><TD> <INPUT TYPE="TEXT" NAME="company_name" SIZE="30" class="shadeform"><br> </TD></TR><TR><TD> Number of Employees:<br> </TD></TR><TR><TD> <INPUT TYPE="TEXT" NAME="employees" SIZE="30" class="shadeform"><br> </TD></TR><TR><TD> Phone:<br> </TD></TR><TR><TD> <INPUT TYPE="TEXT" NAME="phone" SIZE="30" class="shadeform"><br> </TD></TR><TR><TD> Email:<br> </TD></TR><TR><TD> <INPUT TYPE="TEXT" NAME="email" SIZE="30" class="shadeform"><br> </TD></TR><TR><TD> Please confirm your e-Mail:<br> </TD></TR><TR><TD> <INPUT TYPE="TEXT" NAME="email_confirm" SIZE="30" class="shadeform"><br> </TD></TR><TR><TD> <br> Contact regarding:<br> </TD></TR><TR><TD> <select name="regarding" class="dropdown"> <option selected value="None selected">Please Select One ----></option> <option value="Question about our website">Question about our website</option> <option value="Question about our services">Question about our services</option> <option value="Question about our products">Question about our products</option> </select><br> <br> </TD></TR><TR><TD> How did you find our website?<br> </TD></TR><TR><TD> <select name="through" class="dropdown"> <option selected value="None selected">Please Select One ----></option> <option value="Ask_Jeeves">Ask Jeeves</option> <option value="Excite">Excite</option> <option value="Google">Google</option> <option value="Hotbot">Hotbot</option> <option value="Infoseek">Infoseek</option> <option value="Lycos">Lycos</option> <option value="MSN">MSN</option> <option value="other">Other</option> </select><br> <br> </TD></TR><TR><TD> Comments and questions:<br> </TD></TR><TR><TD> <TEXTAREA NAME="comments" ROWS="9" COLS="35" class="textarea"></TEXTAREA> <br><br> <input type="submit" value="Submit" onMouseOver="this.className='buttonon-submit'" onMouseOut="this.className='button-submit'" class="button-submit"> <input type="reset" value="Clear" onMouseOver="this.className='buttonon-submit'" onMouseOut="this.className='button-submit'" class="button-submit"><br> </td></tr></table> </FORM> Hi there, I've got an example xml page that I'm trying to separate into tidier pices (eg separate files for stylesheets, xsl, xml etc). However I don't know how to separate the xml file? Normally in html it's just something like with stylesheets/javascript etc: <script>script here</script> turns into <script src="external.js"></script> But that doesn't work with xml it appears, so can anyone tell me how I can remove the bit in <xml> ... </xml> to an external file and get it loading from that external file...? I have an html application consisted of a number of html files, js files and css files. Is it possible to have an external property file where I can keep the name of the server so as to use a variable for the urls? For example to have something there like nameOfTheUrl=andreana and in the html file to have something like http://nameOfTheUrl/content/index.html My server has java but it is not a servlet container so I can not use jsp. Can an image map be stored externally, and read in, when an image is read in? For my current project, I will have 67 different image maps, but for my next project, that will increase to 125 different image maps. George Hi guys, im trying to setup a simple website for my football team and ive run intio a small problem. I originally had the Navigation code on every page but started to get annoying when i wanted to make changes etc. So by following the FAQ he http://bonrouge.com/~faq#includes I thought id found the answer to my problem but i cant seem to get it to work. The below code is contained in a file called menu.htm <div id="navigation"> <h2>Navigation</h2> <ul> <li><a href="home.htm">Home</a></li> <li><a href="squad.htm">Squad</a></li> <li><a href="fixtures.htm">Fixtures</a></li> <li><a href="matchReport.htm">Match Reports</a></li> <li><a href="news.htm">News</a></li> <li><a href="sponsorship.htm">Sponsorship</a></li> <li><a href="motm.htm">Man of the Match</a></li> <li><a href="forum.htm">Forum</a></li> </div> My code for the first page called "home.htm" is as follows <!--<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> --> <html> <head> <title>Pavilion FC</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="myCSS.css" rel="stylesheet" type="text/css"> </head> <body> <div id="logo"> <h1></h1> <p> </p> </div> <!--#include file="menu.html"--> </body> </html> Is this code meant to have the comments round it? Should it be in the HTML or CSS file? I also tried converting the files to PHP and usign the line <?php include 'menu.php'; ?> but that didnt seem to work either. Both times the menu just doesnt appear. Im using firefox to view the files offline before uploading, so that id upload it anyway to see if php needed to be enabled or soemthing but still doesnt work. Hi I have the following code loading an external .txt file into a DIV <?php $content = file_get_contents($_SERVER['DOCUMENT_ROOT']."/text_files/about_text.rtf"); echo htmlspecialchars($content); ?> It loads, but the line breaks are ignored, so it appears as one continous string of words. How do I make the html display the text file's line breaks? Thanks for your time and info Shaun Hello! I'll be using an HTML pulldown menu system for a website, where the menu links are for pages on that website. Easy enough! But....when I add webpages to the website, I'll have to edit the HTML of the menu on each and every webpage to incorporate the new link. Again, easy enough, but time consuming. So I need a system where the pulldown menu looks to an external file for it's links - then, all I have to do is edit one file instead of editing every webpage. Can anyone help? (BTW - I wasn't sure what board to post this in, so if it needs moving to client-side or server-side, that's cool). hi everybody, I am working in a html. I defined a functiion in a html file.(first.html) I want to call that function in another html file.(second.html) How can i call that function in second.html file? give some sample code Thanks in advance.... I'm new to this forum, a complete newbie, but I was wondering how I can tell my html page to open another html page and read what is in the new page for that specific section. For example: I have google ads on the right side of my website, where I would put the ad, is there a way to link it to another html script without actually putting it in my html page? Kinda like a CSS sheet but the other way around. I don't want to have to go through every page to change the ad code, I just want to change an external sheet where the ad code is. I also want to do this for the body of my website where the content is. Can I link a external sheet that would input content into the body of the website? is it possible to link html code from a seperate external html file. example, the footer and header is always the same and the content changes. can i create a header.html and a footer.html and have my content pages link to the header.html and footer.html. so if i ever need to update the header or footer, i have to do it once. I tried to look on the net but don't know what key words to look under. thanks., First post here. Hope someone can help. I need to embed a table into hundreds of websites. the data in the table changes frequently. I want to be able to alter the table in one place and it changes it on every website. What I've done, and it works well in Firefox, is create a separate html file with the table which resides on the server. Then I use this code in the host website <object data=http://www.web-source.net type="text/html" width="600" height="400"> <embed src=http://www.web-source.net width="600" height="400"> </embed> Error: Embedded data could not be displayed. </object> It will not register in IE though. Works fine in Firefox. Any ideas as to how to solve this or a better easier way to do this?? Thanks in advance. Rich Hi I'm kinda new to all this. I can see this being the first question to a lot of questions and hope you guys can help. Firstly... Can I put a code in my ebay items so that the whole advert document (eg. item1.html) Can be externally loaded in. This way I can change the look of all my adverts by replacing the html files on my server and without having to touch ebay at all. Kind regards John Hello everyone, I am working on a website for a webcomic at the moment and I need the following thing: I will have about 50 HTML pages, each with a different comic page on it. What I need is a drop down form list at the bottom of each page that would show all the other pages and when you would click on one of them, it would take you to said page. But the problem is that as time will go by, more pages will be added, and changing the code of the form on each 50 pages whenever a new one is added seems greatly contraproductive. Is there a way I can code this list separately and insert it somehow in every one of those 50 pages? This way all I would have to do would be editing the separate code and it will update on all the pages. I am quite new to building websites, so please excuse my noobness. Thank you. Hi all, We have a few questions regarding the cashing of an HTML document Scenario : We have an HTML/jsp page with now cache response headers, and this needs a number of JavaScript files and CSS files to achieve the functionality. The following are our questions 1. With no-chache response headers in the base document, whether the included external javascript or css files will be cased in browser? 2. Is there any difference between firefox and IE in this regard? 3. If we decide to gizip the response for improving performance, will it make any difference in browser caching? 4. Is it possible direct the browser not to cache the base document, but cache the the heavy external files which are included? Looking forward for some quick suggestions. Thanks and regards, SAN |