HTML - Only Updating Once, But Affects A Few Pages?
Hi my site
www.brewrecords.net the text on the top right, I have to change it on all pages on the site when a new gig comes in. It is highly time consuming Is there a way i can update it once and that applies to the whole of the site? It's only text. cheers, tom Similar TutorialsHello all, I have recently set up a website for my gaming servers. http://www.accurategameserver.110mb.com As you can see on my site, it has all the recent game changes etc. I find it really anoying and time consuming to have to keep flicking back and forth to change each section data and its usually only like one small change. Any way that I can change it so that it automatically updates to a set image/text on a seperate page? Last question is, how do ou make a registration form on your website without mysql and send out automatic emails. Thanks all in advance. Cheers Don't forget to register to my website for gaming goodness Hello everyone. I'm working on a website and I'm not quite sure how to do something. I'm hoping someone here might be able to point me in the right direction. The site will have content on each product page such as special deals, recent news or announcements. Each product page will also have their contact information. Now what I need to figure out is this. Since the "recent news" , "Special deals" and "Announcements" will be on every product page. I need to find a way to those things on every page at once. Just to show an example. Here's one of the practice pages: http://sbultimate.com/newsite/toeswitch.html If you scroll down you'll see the sample of Announcements, specials and news. That's the part I'm talking about. If any of you can help me learn how to do this I'd greatly appreciate it. Thanks. Ron Hi, I am semi new to HTML coding, I have created several basic websites but I am currently working on a bigger web project. I am hoping to create a website that will get traffic, and I am trying to make it as legit as possible, but of course, I do not know how to do certain things, and help would definitely be appreciated So first of all, the website will be kind of like a news page, so I might very well be updating the main page several times a week with new articles, and as I update, I want the older updates to go to page 2, and articles in page 2 to go to page 3 and on...So it is like a Stack, but I just do not know how to express or code this in HTML or what have you. The second is I wish for people to be able to comment on each article. Now I am not sure if I want them to be signed up users or anonymous, but at the least some kind of system so that people can comment on the articles and talk to each other. Also a a side question, if and only if, the site began to get ads or something, where and how would they be implemented? I have extra spaces at the left and right sides of the website, so I am thinking they could just be implemented there? Sorry to all if these questions sound obvious, but I would appreciate any kind of help Thank you for your time! Introduction: Seeing as this question is brought up very often, I hope this short guide will be a destination for users seeking information about the topic. Although this is a server-side issue, those who are not aware of this fact generally seek help in HTML/XHTML, so this is where the topic will remain Note: Read the answers to Frequently Asked Questions in the next post! Hasn't this been done before? Absolutely; this is meant as a straightforward stickied version that brings a few things together and references previous threads where you can find further details. If your question is somewhere in the realm of one of these, you're in the right place: How do large websites manage their content? How do I make the same content appear in multiple pages without copy/pasting? How do I automatically update parts of different pages, without editing every file? How do I avoid duplicating code in multiple files? Is there an alternative to IFrames? The answer is using PHP Includes, SSI (Server Side Includes), or ASP Includes. Each will be discussed below. Basic Concept: Let's assume we have a basic HTML page with a few links that represent a navigation menu (we're using HTML5 markup for simplicity): Code: <!doctype html> <html> <head> <meta charset="UTF-8"> <title>Main Page</title> </head> <body> <div> <ul> <li><a href="home.html">Home Page</a></li> <li><a href="gallery.html">Gallery Page</a></li> <li><a href="about.html">About Page</a></li> <li><a href="contact.html">Contact Page</a></li> </ul> </div> </body> </html> This HTML page is now our basic template for subsequent pages that we create, which traditionally meant that we copy and paste our menu into each one. However, what if we end up creating 50 pages and then find out we have to add another link to the menu? Our only solution would be to add the link to each page. In order to avoid this, we separate our menu from the rest of the page like so: Code: <div> <ul> <li><a href="home.html">Home Page</a></li> <li><a href="gallery.html">Gallery Page</a></li> <li><a href="about.html">About Page</a></li> <li><a href="contact.html">Contact Page</a></li> </ul> </div> Save it in a file, and then place an include on every page where we want to display the menu: Code: <!doctype html> <html> <head> <meta charset="UTF-8"> <title>Main Page</title> </head> <body> code for including menu would go here </body> </html> This setup lets us update our menu file, and have the changes be immediately reflected everywhere we placed our include. The concept is most often used with things like menus, headers, and footers, but it can be used with anything and we'll now discuss how it's done in practice. Note: The attached zip contains working examples of all three methods. PHP Includes: General Requirements: Your web-hosting provider must support PHP, which most of them do. If your host does not support PHP, I would suggest switching hosts. If you do not have a hosting provider, and you're attempting this on your local computer, it must be set up as a local server and configured to run PHP. The easiest way to do this at once is by installing XAMPP. Required Filetypes: By default, servers will only parse PHP code inside files with the .php extension. Therefore, you must change the extension of any files you want to use includes in to .php (e.g. index.html becomes index.php). Although your main file must have a .php extension, you can include files with extensions such as .html, .txt, .inc, other .php files, and more. Syntax Here are two ways to include a file in PHP: PHP Code: <?php include('file_to_include.html');?> or: PHP Code: <?php include 'file_to_include.html';?> Note that you can also include full URLs if URL file-access is enabled in your server's configuration: PHP Code: <?php include("http://www.google.com/");?> Code Example: (some_page.php) Code: <!doctype html> <html> <head> <meta charset="UTF-8"> <title>PHP Include</title> </head> <body> <?php include("menu.html");?> </body> </html> Server Side Includes (SSI): General Requirements: Your web-hosting provider must support Server Side Includes, which most of them do. If you do not have a hosting provider, and you're attempting this on your local computer, it must be set up as a local server and configured to support Server Side Includes. If you are using Apache, you can find information on enabling SSI here. If you are using IIS, you can install Server Side Includes inside Windows Features > World Wide Web Services > Application Development Features > Server Side Includes, although this path may differ depending on your version of Windows. Required Filetypes: By default, servers will only parse Server Side Includes inside files with the .shtml, .shtm or .stm extensions. Therefore, you must change any files you want to use includes in to have one of these extensions (e.g. index.html becomes index.shtml). Although your main file must have one of the above extensions, you can include files with extensions such as .ssi, .html, .txt, .inc, and more. Syntax Here are two ways to include a file using SSI: Code: <!--#include file="menu.ssi" --> Is used to specify a relative path, i.e. a path to your include in relation to where your main file is. The above assumes that your main file, and menu.ssi are in the same directory. Code: <!--#include virtual="includes/menu.ssi" --> Is used to specify a path relative to the web root. The above assumes that menu.ssi is located inside webroot/includes Code Example: (some_page.shtml) Code: <!doctype html> <html> <head> <meta charset="UTF-8"> <title>SSI Include</title> </head> <body> <!--#include file="menu.ssi" --> </body> </html> ASP Includes: General Requirements: Your web-hosting provider must support ASP. If you do not have a hosting provider, and you're attempting this on your local computer, it must be set up as a local server and configured to support ASP. If you are using Apache, you can find information on enabling ASP here. If you are using IIS, you can install ASP inside Windows Features > World Wide Web Services > Application Development Features > ASP, although this path may differ depending on your version of Windows. Required Filetypes: By default, servers will only parse ASP code inside files with the .asp extension. Therefore, you must change the extension of any files you want to use includes in to .asp (e.g. index.html becomes index.asp). Although your main file must have a .asp extension, you can include files with extensions such as, .html, .txt, .inc, other .asp files, and more. Syntax Here are two ways to include a file using ASP (The syntax is exactly the same as SSI): Code: <!--#include file="menu.html" --> Is used to specify a relative path, i.e. a path to your include in relation to where your main file is. The above assumes that your main file, and menu.html are in the same directory. Code: <!--#include virtual="includes/menu.html" --> Is used to specify a path relative to the web root. The above assumes that menu.html is located inside web root directory/includes Code Example: (some_page.asp) Code: <!doctype html> <html> <head> <meta charset="UTF-8"> <title>ASP Include</title> </head> <body> <!--#include file="menu.html" --> </body> </html> For some wierd reason when I put in a table in my html and I format it so that the table tag is to the left, the tr tag is one indent to the right of the table tag and the td tag is one indent to the right of the tr tag and then I close all of them - when I put the closing TD tag on its own line it causes an extra space on the webpage itself. I am lost on this one. It is happening all over my html page!! Any help would be appreciated. Thanks, George This will be hard for me to explain so I will add an image: http://img75.imageshack.us/my.php?image=examplexu6.gif How do I go about loading a page within a page. For example, in the pic, if you clicked Cost it would load a page within the loading area without taking off to another location. I seen it on a site before, i remember the links were something like "/?p=cost" or something like that. And the page appeared to not navigate elsewhere, the cost page was just loaded within the page i was on. hope that makes sense, if so any examples on this? is it hard to do? messy? safe with most browsers? thanks Hi guys, hope you can help with what I'm hoping will be a simple answer! I'm just developing a small web app using XML as a basic data source. The XML data simply populates an event listing and news page etc. I need the client to be able to add new events and new news stories etc themselves and was wondering if there was a way for him to do it without editing the XML file directly?? Previously, I've used an MS Access database and I've had a basic asp input or update form to add info to the database, but I guess it doesn't work this way with XML. XML seems an extremely easy way of storing, retreiving and displaying small amounts of data in this way, and wanted to avoid having a content management system for the client. Any help would be greatly appreciated!! Kind Regards Gaz How would I set something up on a website hosted by the server, were I can implement a text box that can be update by not updating the actual page it self, so I dont have to continually update the actual page rather some other form be able to update current news, and dates of certain events. If you get what Im trying to say. Not sure if it would be HTMl or PHP. Thanks for the help! Hey I have been asked to design my schools website which involves information from each department i.e. computing, maths, English, ect.. that needs to be included in the site. I would like for the departments to be able to change there information on the site from within the site instead of having to open a html editor and changing the text there then having to uploading it back up to the site. Is there a way that the text can be changed on the site, kind of like wikipedia, but with a html code? Cheers I am creating my first site for a business and I am almost content with the template I am going to be using. The problem is that from time to time new brand names of things will come out and I will need to put a link for them in my links on the right and top of my pages. My plan was to use my template over and over for every page on the site just replacing the content section. Is there a way to update just the main page so that it adds the new links to all the pages instead of going through each one to add them? I have very lilttle exirience with java script and would like to keep it as much pure html and css as posssible Ok so I am extremely new to coding and am setting up a small website. Everything I use right now is based off of a few excel spreadsheets and the site I'm making I want some of that info in a more public format rather than sharing a bunch of spreadsheets. One spreadsheet I have imports the html tables from another website and puts it into a google docs spreadsheet. So whenever the source code is changed on the original website it is also changed on my spreadsheet. Now, is it possible to reference a specific spreadsheet cell(s) (instead of the specific data in the cells) so that when the data is changed on the spreadsheet it is also changed on my website. The way I have it now it only shows what was on the spreadsheet at the time the code was entered. So if cell A1 said apples and then a day later cell A1 changed to bananas, my website still shows apples since that was what was originally entered even though the spreadsheet changed to bananas. I'm not sure if I'm too clear on what I'm asking...I tried. If you have a vague answer or a starting point where I should start looking that would be good too. Thanks. Hey, I have made an HTML-based iPhone theme that is a calendar (screenshot attached). My problem is that the HTML has to be reloaded in order to update the date, and that requires restarting the device. I would like the date to update automatically. Unfortunately, I do not know HTML beyond the minimum to get this working. I tried some javascript functions on timers but I can't get it working. The files are attached. How can I make it update itself? Thanks! P.S. You can load the HTML file on your computer, it just won't have the background or icons or anything. Hi everyone I'm currently told to design a html page that updates live(Constantly changing) data, I wonder if it is possible through html coding. Lets say the data updates every 2 seconds, as in the page changes the data without me manually refreshing the page. Is it even possible in the first place? Sorry, but I'm kinda new to html code writing and all. Sorry haha. I've been running a PS3 Madden 10 Franchise for the last 6 months. I had a fellow member who created a cool website for the Franchise. Unfortunately, he won't be able to help update the website for Madden 11. Currently I'm stuck trying to learn HTML on my own and doing my best to update the website for Madden 11. Right now, I'm trying to change the Home Page banner. However, I can't seem to identify it in the code. For some reason the banner is split into two parts. " HomePageBanner1.png " and " HomePageBanner2.png " ... I would like to switch the current home page banner to the following, " DrewBreesBanner1.png " and " DrewBreesBanner2.png " ... Any help is greatly appreciated. Thank you. The html code for the home page is: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Blu Ray Franchise - League of Champions - Home Page</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link rel="stylesheet" type="text/css" href="Style.css" /> <noscript></noscript><!-- --><script type="text/javascript" src="http://www.freewebs.com/p.js"></script><script language=JavaScript> var message = "Sorry, right click is disabled! (:"; function rtclickcheck(keyp){ if (navigator.appName == "Netscape" && keyp.which == 3){ alert(message); return false; } if (navigator.appVersion.indexOf("MSIE") != -1 && event.button == 2) { alert(message); return false; } } document.onmousedown = rtclickcheck; </SCRIPT> <SCRIPT TYPE="text/javascript"> <!-- function popup(mylink, windowname) { if (! window.focus)return true; var href; if (typeof(mylink) == 'string') href=mylink; else href=mylink.href; window.open(href, windowname, 'width=660,height=380,left=375,top=225,scrollbars=no'); return false; } //--> </SCRIPT> </head> <body> <div id="header"> <center> <table border="0"> </tr> <br> <br> </table></center><font> </div> </div> <br> </div> <img src="Titles/FootballBanner.png"> <br> <br> <div id="wrapper"> <div id="sidebar"> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <ul id="navigation"> <div class="news"> <br> <br> <br> <br> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <br><center><img src="Others/PowerRankings.png"></center> <br> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p><center><div id="cboxdiv" style="text-align: center; line-height: 0"> <div><iframe frameborder="0" width="175" height="289" src="http://www5.cbox.ws/box/?boxid=637639&boxtag=vfs7an&sec=main" marginheight="2" marginwidth="2" scrolling="auto" allowtransparency="yes" name="cboxmain" style="border:#DBE2ED 1px solid;" id="cboxmain"></iframe></div> <div><iframe frameborder="0" width="175" height="91" src="http://www5.cbox.ws/box/?boxid=637639&boxtag=vfs7an&sec=form" marginheight="2" marginwidth="2" scrolling="no" allowtransparency="yes" name="cboxform" style="border:#DBE2ED 1px solid;border-top:0px" id="cboxform"></iframe></div> </div> </center> </div> </ul> </div> <div id="content"> <div class="search"><span></span> </div> <br> <br> <br> <br> <br> <br> <div class="bg"> <div class="column1"> <img src="Headlines/LatestHeadline(Top).png"> <br> <a href="Headline9.html"><img src="Headlines/LatestHeadline(Read).png" border="0" /></a> <br> <img src="Headlines/LatestHeadline(OtherHeads).png"> <br> <a href="Headline8.html"><img src="Headlines/LatestHeadline(Head8).png" border="0" /></a> <br> <a href="Headline7.html"><img src="Headlines/LatestHeadline(Head7).png" border="0" /></a> <br> <a href="Headline5.html"><img src="Headlines/LatestHeadline(Head5).png" border="0" /></a> <br><br> <a href="Headline4.html"><img src="Headlines/LatestHeadline(Head4).png" border="0" /></a> <br><br> <a href="Headline3.html"><img src="Headlines/LatestHeadline(Head3).png" border="0" /></a> <br><br> <a href="Headline2.html"><img src="Headlines/LatestHeadline(Head2).png" border="0" /></a> <br><br> <a href="Headline1.html"><img src="Headlines/LatestHeadline(Head1).png" border="0" /></a> <br><br><br><br><br><br><br><br><br><br><br><br><br> <br> </div> <div class="column2"> <div class="news"> <br> <center><img src="Others/CowboysEagles.png"></center> <br> <br><center><img src="Titles/FootballBanner2.png"></center> <br> <br> <br> <br><center><img src="Others/PoWeek1.png"></center> <br> <br> <br> <br> </div> </div> <div class="news"> </div> </div> </div> </div> <center><img src="Titles/FootballBanner.png"></center> <br> <div id="footer"> <ul> <li><a href="Home.html">Home</a>|</li> <li><a href="TeamOwners.html">Team Owners</a>|</li> <li><a href="Standings.html">Standings</a>|</li> <li><a href="LeagueLeaders.html">League Leaders</a>|</li> <li><a href="WeeklyRecaps.html">Weekly Recaps</a>|</li> <li><a href="Highlights.html">Highlights</a>|</li> <li><a href="http://forum.blu-ray.com/blu-ray-games-playstation-3/135356-rules-madden-2011-sim-online-franchise.html#post2987081">Rules</a>|</li> <li><a href="http://blurayfranchise.creaforum.net/index.htm">Forums</a></li> </ul> <p></p> </div> </body> </html> The website can be viewed HERE . Hello, I'm a bit of an amateur at HTML, I'm still using notepad to make my site ;-) Anyway for the most part I've had good success when updating my website, however now I'm encountring a real head scratcher and I'm hoping some of you kind and wiser gentlemen (and ladies?) can help. After inputting my code and building locally I see the image below to the left, however upon uploading all my goods (using Ipswitch WS_FTP Pro 30 day trial) it appears that my code has updated correctly, however none of my images show up, as seen on the below image to the right. I've attempted to troubleshoot this one a bit but I think I've hit a wall, I don't know if it's the FTP program I'm using (hasn't given me issues in the past) or if I'm running out of space on my site? but even some images that I merely swapped for newer images aren't updating (same file name, etc) It's as if it wont accept any new jpegs! I can change the code and the simple text that I have and it'll update fine and dandy but needless to say on a site that's supposed to feature art pieces, I'd like to get my artwork updated :-( My site is www.alexanderalza.com Any help would be GREATLY appreciated, thank you very much! Hi! I am currently studying a Comp Sci degree in college. I want to create a few webpages and cut my teeth. I know basic html but would like to do something more advanced. I want to add a widget or script of sorts to a webpage to allow news updates, adding pictures and text basically. I am not really sure what I am looking for and would just like to know what terms or terminology to search for. Would this come under the heading of Javascript, php, perl, widgets? Any help is appreciated. Hello, I have about 25-30 pages on my site. It has a link navigation menu and a sidebar on the left with newsletter opt in, products for sale, etc... I was wondering if there was a way to change/ edit the contents of the sidebar on EVERY PAGE without having to manually go in and change the updated HTML code on every single page. Is there a script that i can use to make this happen that I can just edit the sidebar and it will "update" the sidebar on all 30 pages accordingly?? Rather than manually doing this 30 times for every page my website is http://www.optimumtennis.net thanks in advance Hey there, I started html/css a few days since I wanted to make my own website for my own Minecraft server and I've ran into a little problem with it. I tried putting 2 videos aswell as a paragraph of text on the front page and well... the video at the bottom of the page was well below the white line. Is there something that I need to do so the page updates and expands? My html and css is below. HTML 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" /> <title>Dawn Craft</title> <link href="css/style.css" rel="stylesheet" type="text/css" /> <style type="text/css"> body { background-color: #000000; background-image: url(); } body,td,th { color: #FFF; } </style> </head> <body> <div id="header"><a href="index.html"><img src="images/header.png" width="900" height="100" /></a> <div id="menu"><a href="index.html"><img src="images/Home.png" width="80" height="25" /></a><a href="http://www.dawncraftmc.com/"><img src="images/Forum.png" width="80" height="25" /></a></div> </div> <div id="content_wrap"> <div id="left_content"> <div id="information" style="text-align: center; font-family: Verdana, Geneva, sans-serif; font-weight: bold;"> <p>Server updates</p> <p>----------------------------</p> <p>Congratulations to ICOZANE1 and 450airsoft on becoming the first 2 moderator's.</p> <p>----------------------------</p> <p>The server is being upgraded to 26 slots!</p> <p>----------------------------</p> <p>We got a new site! We will be keeping the forum.</p> <p> </p> <p> </p> <p> </p> <p>Vote for the server! <a href="http://www.xtremetop100.com/in.php?site=1132322674"> <img src="http://www.xtremeTop100.com/votenew.jpg" border="0" alt="Minecraft"></a></p> <p> </p> <p> </p> <p> </p> </div> </div> <div id="right_content"> <p> </p> <p style="text-align: center">A quick look at the 1.7 pistons update.</p> <div class="video_wrap2"> <iframe width="640" height="390" src="http://www.youtube.com/embed/uZJr86d2IUo" frameborder="0" allowfullscreen></iframe></iframe> </div> <p style="text-align: center"> </p> <p style="text-align: center"> </p> <p style="text-align: center"> </p> <p style="text-align: center">---------------------------------------------------------------------------------------------------------------------</p> <p style="text-align: center">The Server will be staying at 1.6 until all the mods are updated! Keep checking the site or the forums for updates. </p> </div> </div> <div id="footer" style="text-align: center"> <a href="http://minecraftviewer.com/servers/38428/view" target="_blank"><img src="http://cache.multiplayuk.com/b/1-38428-560x95.png" alt="Server Banner" style="border:0;width:560px;height:95" /></a> </div> </body> </html> Code: @charset "utf-8"; /* CSS Document */ body { margin:0;} #header { height:90px; width:855px; margin-left:auto; margin-right:auto; } #menu { height:45px; width:500px; margin-top:5px; margin-left:auto; margin-right:auto; font-family: District; border-bottom-width: 0px; border-bottom-style: none; border-bottom-color: #FFF; } #content_wrap { height:800px; width:980px; margin-left:auto; margin-right:auto; margin-top:10px; border: 3px solid #FFF; -moz-border-radius:20px; -webkit-border-radius:15px; background-color: #000; } #left_content { height:800px; width:240px; float: left; background-color: #000; border-top-color: #CCC; border-right-color: #CCC; border-bottom-color: #CCC; border-left-color: #CCC; } #information { height:719px; width:220px; margin-top:70px; margin-left:5px; -moz-border-radius:20px; -webkit-border-radius:15px; border: 3px solid #FFF; } #right_content { height:800px; width:730px; margin-left:10px; float: right; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-top-color: #F00; border-right-color: #F00; border-bottom-color: #F00; border-left-color: #F00; } .video_wrap2 { height:390px; width:640px; margin-left:auto; margin-right:auto; margin-top:30; } #footer { height:25px; width:980px; margin-left:auto; margin-right:auto; margin-top:10px; } The website I am working on has been constructed all with html, css, and javascript - it is currently not hosted at this point. On each page there is a menu on the left side that has all the links. I am looking for a way that I could update all of these links by updating just one file. The left side code is essentially: Code: <div id="links"> <table> ---- </table> <table> ---- </table> </div> I was thinking javascript could do this, but I don't have enough know-how to do this. Im not sure if this an html, php, or javascript question but here goes. I am trying to set up a place at my sight where I can have a content page from a certain link update automatically. For example, I want to create a 30 day journal link where each day a new journal page would come up. To my understanding I know I would have create a folder that would have 30 separate html pages. But my question is how can I set up the site that each page would automatically update according to day and time. Let's say that at 12:00am midnight a new html page with new content would be available for the reader. I don't have a lot of time to manually update the link with new content, so I want the site to do it on its own each day. Am I making any sense? I just need to know how I can have content automatically update each day without my needed to go and do it manually every day. Any help would be appreciated....thx so much. |