HTML - Use External File Without Java
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. Similar TutorialsHi 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...? 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 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! 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 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 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 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. 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. 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 Hi Guys. My website contains a lot of text, and its continually printed by clients as it includes pricing etc. At the moment my pricing page is 4 pages of paper, however I wish to be a touch kinder to mother nature and be a bit more eco-friendly so I have created a document with all the pricing on one page which I have saved as a PDF file. I would like to add a link on my website to "Printer Friendly Version" which would link to the PDF and would bring up a print dialog box. What coding would I need to do this? I think it may very well be Java but I'm not the brightest when it comes to this Any help appreciated! I hope this all made sense! How do I Link text in a div, h1, h2, p to an external text file or xml file - I don't really know how to ask the question. I think I need an xml file that can be easily edited by a user saved to the server to update an xhtml page text without the user getting bogged down in html. I don't want to use joomla or cms. <Any ideas />? Best wishes, mas How to create explorer like menu in Html or java script? eg + Game(inside this Cricket and Football) when click on + sign it become like-- - Game -Cricket -Football Can anybody suggest me, by which command I can do it? Commercial Removals || Removals and Storage||Specialist Removals Hi folks. I suspect this a total noob type question but I can't find anything in DW help or by searching so here goes. I have a page with frames. In one of the frames I want an external URL to be displayed rather than content from the mother site, if that makes any sense. I don't mean asa a link, I mean the actual content to be displayed. How do I do that? Something like... TopFrame = ./top.html LeftFrame = ./left.html BottomFrame = someother.domain/fred.html And they all get shown when the page is loaded. Ta muchly for your help! Simon. I have managed to get an external style sheet to work on 7 of my 8 pages. I cannot figure out why it will not work on the 8th page. The code was copied and then modified to fit the new page so there should be no reason it shouldn't work. http://ironhillsclan.com the forum page (rules.html) is the only on that doesn't work. Any ideas? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Dagorhir | Iron Hills Clan: Forum Rules</title> <link rel="stylesheet" type="text/css" href="style.css"/> <meta name="keywords" content="iron,hills,dagorhir,larp,sword,fighting,clan,ragnarok,battle,forum,rules"/> <meta name="description" content="These are the rules for our fourm, please abide by them for the sake of all."/> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta http-equiv="Content-Language" content="EN-GB"> <script type="text/javascript"> function show_confirm() { var r=confirm("By choosing yes you agree that you have read, understand, and will abide by the terms of use."); if (r==true) { location.href = "phpBB3/index.php" } else { location.href = "index.html" } } </script> </head> <body> ... </body> </html> Could anyone please tell me the code to call an external html file? I need to refresh my memories! Is it possible to log the amount of times an external link has been clicked on your site? Hey folks, I have been looking all over the web for hours looking for the script that potspace.com uses that cool little warning thing. No I do not use potspace.com Some one told me about their pop up notifier thing and I want it for my site however It's just a regular site. I want to use that for Website Alerts. =) I really want that script If some one could please just visit potspace.com as soon as they get to the site a div will pop up I like that it's really cool can some one please get me the script that does that. I thought I made it but I didn't it just stayed on the page 24/7 LOL it didn't have that re'direct back to the page button. Also It only shows up one time per a session.!! First of all sorry, but couldn't figure out where to put this :s anyway, I'm wondering what would be a good program to write Java applet's with for a website. I'm planning on making my own Java irc (applet) so that it will blend in nicely with the rest of the website style, and as such doesn't clash with it so any good programs, tutorials would be welcome // JavaScript Document document.write("<style type=\"text\/css\"><\/style><script type=\"text\/javascript\">function init(){ var mywindow; w=+screen.width; \/* this value may be edited *\/ h=+screen.height; \/* this value may be edited *\/ t=(screen.height-h)\/2; l=(screen.width-w)\/2; features='height='+h+',width='+w+',top='+t+',left='+l+',scrollbars=1,resizable=1,menubar=no,location =no,directories=no,toolbar=no,'; df=document.forms[0]; df[0].value=''; df[0].focus();df.onsubmit=function() {if(df[0].value==''){ alert(''); df[0].focus(); return false; }else {if(mywindow) { mywindow.close(); } mywindow=window.open('http:\/\/www.smalldotdesign.net\/'+df[0].value,'',features, document.title = "Hello"); mywindow.focus(); return false; } } } window.addEventListener? window.addEventListener('load',init,false): window.attachEvent('onload',init);<\/script><\/head><body><form action=\"#\"><div> <label for=\"inp1\"><\/label> <input id=\"inp1\" type=\"text\"> <input type=\"submit\" value=\"Login\"><\/div><\/form><\/body><\/html>"); where do i put a Code: document.title = "X" I need to make the title of the popup window a value and it's not working... the form and button don't appear when I try to do this. Can someone help? Ok, so I've recently been given a project my my comp sci teacher to do a word game. It's the one where the computer picks a random word of a certain length and you have to guess the word. Each guess, it tells you the amount of letters that are in the word (but not the ones that are in the right place. For example, moon + know = 2.) I currently have the word game down, but I need help with an extra credit part. Also, I'm writing this in java and making it web based. Only on my local host though. For example, I got http://localhost:8000/rawr.html (rawr being the name of the page) and I get taken to my homepage. The main focus of the lab was doing binary search and word comparison, but the teacher always add extra credit parts for those who go above and beyond. Now, because this is java, it is extremely hard to do HTML commands, for instance, changing font color and the name of the title bar. I have to do con.println("<html><body>random junk la la</body></html>"); with con being my network connection object. I can also do con.println("<html><body>"); con.println("random junk la la la"); con.println("</body></html>"); and other ways of rearranging the print statements. Now that you all have the background, let me ask my question. I want to be able to have a table of letters and when I click on a letter once, it goes to blue and when I click on it one more time it turns red with a strike-through and when I click on it once more, it resumes its normal black format. So I need someone who's good at Java and HTML to help me If you need more information or background, just ask me and I'll provide it. And I need help pronto cause it's due soon. Thanks ~Smipims~ |