switch
Nov 28 2005, 07:50 AM
| | Hey guys
I'm overhauling my website and have decided instead of using frames I want to just have a logo and buttons integrated into each HTML file, so you can just scroll down past it. I want the logo at the very top, before any content.
I was wondering if there is any way of doing it with an HTML tag (i.e. not PHP or any other scripts) so the header just gets inserted right after the opening <BODY> tag. I'm thinking that possibly it uses the <link> tag, but really I don't have much of an idea.
Thanks in advance for your suggestions.
Peace out  |
Comment/Reply (w/o sign-up)
Tyssen
Nov 28 2005, 08:54 AM
It sounds like you're talking about server side includes.
Comment/Reply (w/o sign-up)
Avalon
Nov 28 2005, 12:22 PM
I think the simplest way to do this is to use a javascript that has the information you want and then insert the script in the page where you want it. Unlike PHP or ASP etc. a javascript will work on almost any web host, essentially it is just inserting a text file. Here's a very simple example for inserting a logo image and some buttons, note the use of single quotes around the image and page names. CODE document.write("<img src='my_logo.jpg'><br>") document.write("<a href='contact_page.html'><img src='contact_button.jpg'></a><a href='search_page.html'><img src='search_button.jpg'></a><a href='gallery_page.html'><img src='gallery_button.jpg'></a>")
Save the above text in a file called 'mynav.js' and upload it to your web server. Then to display it on a page, just insert the following script tags at the position on the page where you want it to display, in your case it would be immediately after the '<BODY>' tag as shown below. CODE <html><head><title>My Web Site</title></head><BODY> <script src="mynav.js"></script> The rest of your page code goes here....
You can use pretty much any html code you like, just so long as you replace any double quotes (") with single quotes ('). Experiment a little to see what you can do. As you can see from the example above, if you are going to insert a large amount of html, you can do multiple 'document.write' statements. I hope that helps. 
Comment/Reply (w/o sign-up)
jlhaslip
Nov 28 2005, 04:44 PM
Avalon, If your approach is used, does the html code you insert via javascript get the css applied to it if the css is in a css file?
Comment/Reply (w/o sign-up)
sportytalk
Nov 28 2005, 05:03 PM
In my website, i gave up with standard frames because in my opinion, they looked pretty ugly and most web-authoring programs nowadays include framed pages as part of their standard templates, hence meaning users think you're just using a template rather than actually going ahead and creating the website yourself. I have, in the past, used IFrames, still based along the idea of frames, although they allow you to place frames almost anywhere on your webpage, meaning you don't have to worry about loads and loads of code. Only problem with frames, or anything relating to frames, is that not all internet browsers support these (yet). It's best to use php when at all possible. Even WebTV, a prime example of a basic browser, can access the php and perform the functions. If you can't use php, try to use tables in html! Hope this helps
Comment/Reply (w/o sign-up)
Tyssen
Nov 28 2005, 10:36 PM
QUOTE(Avalon @ Nov 28 2005, 10:22 PM) I think the simplest way to do this is to use a javascript that has the information you want and then insert the script in the page where you want it. Unlike PHP or ASP etc. a javascript will work on almost any web host, essentially it is just inserting a text file.
It may work on almost any host, but unlike server side scripting languages, javascript can be turned off which means that users of your site will be missing whole chunks of the page. W3Schools figures show that about 10% of users have js turned off which is a very large slice of your audience who won't be able to use your site properly (especially if you're using it to display your navigation. Stick with server side includes (they can be configured to work with HTML, no scripting languages required) - they're the industry standard.
Comment/Reply (w/o sign-up)
Avalon
Nov 29 2005, 01:18 PM
QUOTE(Tyssen @ Nov 29 2005, 09:36 AM) It may work on almost any host, but unlike server side scripting languages, javascript can be turned off which means that users of your site will be missing whole chunks of the page. W3Schools figures show that about 10% of users have js turned off which is a very large slice of your audience who won't be able to use your site properly (especially if you're using it to display your navigation. Stick with server side includes (they can be configured to work with HTML, no scripting languages required) - they're the industry standard. You make an excellent point, I didn't realise that many people turn off js. To clarify things a little here, perhaps you could explain what server side includes are, how to use them and any restrictions they impose. @jlhaslip Yes, the html you insert is affected by css like the rest of the page.
Comment/Reply (w/o sign-up)
Tyssen
Nov 29 2005, 10:04 PM
QUOTE(Avalon @ Nov 29 2005, 11:18 PM) To clarify things a little here, perhaps you could explain what server side includes are, how to use them and any restrictions they impose.
They work in a very similar way to the js method you posted. You create a file with the piece of code that's to be inserted into another file and then you write a line of code in that file that calls the include. For PHP it looks like this: CODE <? php include('yourfile.htm') ?> In ASP and HTML it looks like this: CODE <!-- #include virtual="/yourfile.htm" --> Some configuration of the server is required to get it to work for HTML as it is not usually enabled by default. PHP, ASP, JSP, Coldfusion etc. all enable them by default. You can call any file to include in your document: .htm, .txt, .inc, .asp, .php. In fact, you can write scripting code in a .txt file and it'll work as intended if it is included in a file with the relevant extension (e.g. .asp or .php). I'm not aware of any restrictions (except if you're server isn't configured to accept them which wouldn't be the case if you're using Trap17). The benefits over the js method is that they can't be turned off and rather than being written to the page as javascript, they get written as HTML (or whatever else you've included).
Comment/Reply (w/o sign-up)
switch
Nov 30 2005, 09:09 AM
ok, thanks everybody, i'll definately take a look at that. i'm sort of actually leaning more towards a client side thing though, would there be any feasible way of doing that? thanks heaps for your help and advice guys, i really appreciate it
Comment/Reply (w/o sign-up)
Tyssen
Nov 30 2005, 10:29 PM
QUOTE(switch @ Nov 30 2005, 07:09 PM) i'm sort of actually leaning more towards a client side thing though, would there be any feasible way of doing that?
Why are you leaning towards client side when, as already pointed out (twice), if it's client side, the client can turn it off (whether intentionally or not)? Which when you're talking about the actual code of your site, is a bad thing.
Comment/Reply (w/o sign-up)
iGuest
Sep 20 2009, 01:29 AM
Extract some html from one site, to display on another via code?
Integrating One Html File Into Another
Okay, I accept a few things already. One, this may be insanely hard to impossible. Two: It is complicated to explain.
I'm trying my best to keep several sites up to date, with several things ranging from schedule, to practice times, etc. The 'Master site' where I place a large chunk of (sometimes all of it) data, is one step. But then I have to take the appropriate bits and move them to their respective sites as well.
I'm trying to find out of there is a way to extract/snip/look at a specific section of my master site, using code located on the secondary site(s), so I only have to update one of them, and the others fall in place as well.
This would cut about 30 minutes to an hour off my average time updating stuff.
-reply by David
Comment/Reply (w/o sign-up)
frozen.fish
Apr 28 2009, 09:48 PM
there are no other way to pull other pages into your page other than frames..
Comment/Reply (w/o sign-up)
iGuest
Apr 21 2009, 03:17 AM
My question is what if you are NOT using a server???
Integrating One Html File Into Another
I send out a Christmas CD each year... The user puts it into the PC and it autoloads index.Html which starts the show. It's all contained on the CD... No internet connection needed. In the past I used frames where the first loaded the menu on the left and the main page on the right. Wanting to get away from frames... I was wondering how I could write one menu.Html page and have it automatically pulled into the rest of the pages.
I'm thinking there would be a DIV that would be on the left... And another on the right. I don't even mind using a table with two cells... And loading the menu on the left and the main page on the right. Clicking the menu would open a new page that would also contain the same menu.
The problem is... No server, no ASP, no PHP... Just a CD loading pages.
Can it be done?
Thanks,
Jerry\
Comment/Reply (w/o sign-up)
iGuest
Feb 27 2009, 07:20 AM
Dependences on web server Apache or IIS and configuration of server
Integrating One Html File Into Another
No, that's incorrect actually - you can include any sort of file, even
.Txt files. The file calling the include must have the correct file
Extension, but it doesn't matter for the include itself.
That is wrong it depends on webserver configuration and brand like PHP on IIS or PHP on Apache is so diferente.winner example page
-reply by Winer Reales Keywords: it is possible to put html form in another one
Comment/Reply (w/o sign-up)
Tyssen
Jan 16 2006, 01:12 AM
QUOTE(jlhaslip @ Jan 16 2006, 10:56 AM) Okay, thanks for the answer Tyssen, however, by way of PM from Buffalohelp, I have information which suggests I stop with this Html Include stuff because Trap17.com does not support them. Now that I know this, I will continue with php includes only.
(apperently, Html includes is a MS ASP construct and trap17 is Linux, so that's why they aren't supported here.)
I actually wrote a post that said something like that the first time, but something happened and it didn't get posted, so the 2nd time around I just went for the quick approach.
Comment/Reply (w/o sign-up)
Similar Topics
Keywords : integrating, html, file, embedding
- W3schools.com Is Down
Ask your CSS/HTML/PHP questions here... (8)
Html Code Question
(2) Hi all, I was wondering is there a way I could make a field in a form that will take you to the
address you enter in it? (in other words) Site: trap17.com (go) and clicking go takes you to
trap17. I will explain why. What I have done is set up a page with frames, I've got all my
most visited sites on the left, and I browse in the right, I want to make a frame up the top of the
browsing window that will be like the address bar, Just to retain this framed setup. (I will put a
google box in it too). Alot of you are probably wondering why, its for purely aesthetic....
Some Questions On Html
(10) I was just curious on how people here learned HTML or XML (assuming you did, which, judging by the
fact you are actually here on this board). How long did it take for you to learn the basics of HTML?
How proficient are you right now in HTML? Which resources did you use when you were learning HTML
(or are currently learning HTML?). How did you find learning HTML? Thanks.....
Help Making A Web Adress Bar Using Html/js
(9) Hey I need to make an adress bar basically you imput into the field press enter and your away but it
cant use php or any code that needs to be installed, its all part of a workaround for my school
interenet!....
Html Ascii Codes - A Complete List
downloadable php file (3) I was often frustrated at how, despite there being thousands of ASCII "special characters" such as
&8659; , websites that claimed to list them all only listed the first 256. To combat this issue, I
have created a table which lists the first 10,001 - from to &10000; I am sure there are many
more but it is simply not feasible to create a table with many more rows as viewing it would put
terrific strain on the browser.! You can download the file in two forms. One uses PHP to
dynamically create the table (1KB), the other has it ready-made in pure HTML format (437KB....
Html Div Help [resolved]
help with the divs in ipb (1) hey guys, as you may know, i have ipb 2.3.4 set up on my site. i am currently using the centura
skin and like it a lot. i have customised the header bar in terms of the logo, however also want a
slab of text linking to the forums home at the top of the banner. i have so far managed to achieve
this to work in firefox (see attached screenshot), however it just screws up in ie, opera and safari
(i think). the link is here here is the code, both html and css, of the ipb header, and i have
placed between stars the parts i have edited: CODE the css (only the edited....
Iframe Src = A Local File In My Computer
(7) Is it possible to call a file, i.e. 1.htm, from my web browser using such tag HTML iframe src
=" file:///C:/1.htm "> /iframe > file:///C:/1.htm is the correct path since when I enter it
to my web browser's address box it shows up properly. But when I use the same call function in
my PHP it does not. My situation is that I'm running Apache with PHP, therefore I am running my
own mimi-webserver on my computer. There's no risk of someone else accessing my file because
it's for my testing purpose. I thought it had to do with some Apache settin....
Best Way To Protect Html Form Fields
Looking for suggestions on how to protect form fields during user inpu (3) My working example is here http://sonesay.trap17.com/application.php The form submits to itself
and stores what ever the user inputs into session variables. Thats all fine and I have validation
checks for it, I wanted to add more and I remember comming across a site where they would lock from
fields to prevent any changes if the information was already supplied and validated. I'm looking
to build something similar but cant seem to figure out how to get that same effect at this time.
Heres my program logic so far application.php includes('application_content.....
Html Application Form
(6) does anyone know how to make a form/application that when you submit the form with the submit but it
sends it in a email to you email address if anyone on here knows please please let me know thanks, i
want this so i can have members apply for a team on my football site and there information will come
back to me and i can accept or reject them for that job....
Login In Using Html
(12) I have looked around and I can't find any code to help me out. I want to make it so you can log
in to my site to get member featues. Could some one please help me....
Wanna Learn Html From Scratch
downloade an online tutorial,formatted my c: lost it forever,and FORGO (5) id prefer something i can download .....coz my internet connection is highly intermittant Moved
from the Java section to the HTML section. ....
Help With Css/html Layout
Horizontal List Problems (5) I can't figure out why this horizontal list isnt working. Underneath my banner is supposed to
be a green gradient bar with a list of links in the center of the page. The links are all the way
to the left and are really small. The banner is also overlapping the list for some reason. This is
my current layout(don't worry, I'm not trying to advertise).
http://www.stormgaming.net/stormcreations/ This is my CSS file
http://www.stormgaming.net/stormcreations/storm.css Thanks in advance for any help.....
Html Help
(6) ok so i need help again i was wondering how i can make a navigation bar that looks like this
Free Website Templates Information Slide
Show Pictures title="Time Line"> Time Line
Im having a problem putting the names of things that i want to go in those four boxes i tried to put
in names but it didnt show up so i was wondering if anyone could give me some help....
Some More Help With Html
(2) Ok so yet again i need some help i have this so far: CODE Pearl Harbor
i have two images on the right and a video on the
left but i dont know how to put two more pictures right underneath the ones on the right without
something moving and also i used the to make a break underneath the video and i had to use to
move it down and i know you can use but i am pretty sure there is another way that i can do it
without using those so if anyone can give me any kind of help that would be awsome.....
Ok Background Help Please
html (4) OK so i've given up on the paint for background now how would i get it to look like this
http://img.photobucket.com/albums/v614/Dj1.../background.jpg without using paint and without it
coming out to look like this... http://img.photobucket.com/albums/v614/Dj169211/Damn.jpg like,
with just html code, not trying to use paint and do the BS any ideas?....
Help With Html
(11) Ok so i just started learn html about a couple of weeks ago and i make a background image using this
code: CODE body {
background-image:url("http://img.photobucket.com/albums/w59/tuhyd/backgrounds.jpg");
background-repeat: no-repeat} and i am having trouble putting my text on the top in the center
becasue my links are on the left every time i try and move the text up it moves the links down and
separates them and i don't know what to do. added code tags. please use appropriate bbcodes as
needed. ....
Having Html Troubles......
Please help! (1) I'm having troubles with the background colours on the HTML pages on my site
keri-j.trap17.com Basically, the colors are hex codes and i'm no HTML n00b, god no! But, I just
can't figure this one out! I have the background colour in the body tag (duh) " " on all my
pages but on some of them the background is white. This might be to do with some javascript i have
recently edited in each page or certain errors but whatever it is i can't figure it out! This
is my homepage with the correct background color This is my poetry page with the faulty colour c....
Wanting To Touch Up/learn My Html Again
(27) Ok, well recently i realized that i am not as skilled in HTML (such as building website layouts) as
i want to be, with tables etc... and so i was thinking about going through many many many many many
many sites and just touching up on my HTML and see if i can code my own website template before
starting to learn PHP because that is what i want to do. so, i am asking all of you experianced
people on trap17 what websites did you use to learn your HTML skills, yees i know i could go to
google and type in learn html or somthing along the lines of that, but i want to know wh....
Creating Link In Html - Help Me With This!
(5) edit: Neeeaavverrrminddd..... I was a total noob at php when i posted this and I needed help doing
something with bbcode in php and didn't really know what I was saying.. /blush.gif"
style="vertical-align:middle" emoid=":blush:" border="0" alt="blush.gif" /> Anyway topic
resolved.......
Html Question Concerning Pre Tag And Code Tag
(8) My question is, why would anyone use the CODE tag when you can use the PRE tag? 1. The PRE tag
recognises white space, the CODE tag does not. 2. The CODE tag requires that you escape some
chars, the PRE tag does not. I cannot see anything that the CODE tag achieves that is special apart
from sounding as though it is perfect for displaying code which IMO it is not. Thanks. ....
Do You Know Html?
Just Wondering, most of you would know. (65) Well I was just wondering, i know this polol might sound stupid, as this is a hosting site forum and
the chances are you do know HTML, but the other day i met 2 people who didt have a clue what HTML
was, and was just at the forum because they found this forum active. And also do you know any other
programming languages, just wondering. I myself know HTML, C++ kinda, and learing PHP. Talking about
Languages I know Tamil, English, Lote /tongue.gif' border='0' style='vertical-align:middle'
alt='tongue.gif' /> .....
Html Templates
HTML Templates for website (4) Where do i get free HTML Templates to use in look and feel of website? Any link will be
helpfull....I know there are some free templates available but it is hard to find even by
gooooogling it. Please, share if you have any. Thank You.....
Word.doc Or Pdf Formatted File To Display In A Web
How to maintain the formatting??? (14) I have a document which was originally created using ms office word processing with very strict
formatting requirements. It is a high level academic paper which I would like to make viewable
within a web page complete with the original formatting. I also have it available as a pdf file with
the same formatting. Regardless of the format, is there a way to convert this highly formatted
document into an html page and retain the formatting without major work? The only way I have been
able to do this so far is with the use of a table layout , an iframe, and the client havi....
Html Editor
non WYSIWYG (22) What editor can I download and use that isn't a WYSIWYG(what-you-see-is-what-you-get) and is
free. Currently I use NotePad but I want something better.....
Html Cool Codes?
(7) hey guys..whats up..well i ws just wondering if you guys have any cool codes for myspace or
something..you know to design a page using html/css codes...see i tried googling around but all the
sites had the same thing..they dont have a unique one...i want like games in my page...like my
friend he had like tetris in his page..and i want a game// or anything like that to make my page
cool /smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' />
anybody????plz...PEAcE!....
Disable Scrollbars, Menubars Etc....
Javascript / Html code to disable them (7) hi, i would like to know how the scrollbars, menubars etc.. can be disabled. I hope someone can help
me with this. /biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif"
/> Btw: can you tell me where the code should be inserted to? thanks! /cool.gif"
style="vertical-align:middle" emoid="B)" border="0" alt="cool.gif" />....
Css Or Html Tags
Which is better to use???? (24) Dear friends, I am new to web site designing. I am using NVU for creating my web
pages. It has a option in which we can select that the editor will use CSS or it will use html tags
for coding of the page. For example - If I want to make the text bold then if tag is used the code
will be QUOTE Your text and if the CSS is used the text will be QUOTE Your text .
Please suggest me which option I should choose to make my web page standard to modern HTML
standards. Thanks in advance.....
Colors in Html
everything about colors (9) Hey...I've had a few problems with choosin the color in html language. I found a good page wich
describes all you need to know.. http://bignosebird.com/colors.shtml Next thing you need and it
really is useful is a program that shows you the color code..you have it online here:
http://www.pagetutor.com/pagetutor/makapage/picker/ hope it helps ya....byeeeeee....
where did you learn html from?
(125) HI, i am intresting in knowing where you began learning html of what inspired you to start learning
html. which programs did you use or which progs dyu use?....
How To make Cool Inverted Table
neat little HTML trick Very Easy (7) This is a Very neat way to add a cool effect to your webpage! Its great for Holding Links......or
anything else you can find a use for it. CODE HtmlGoodies W3C Schools
Heres The same Code on a Page Take a Look:
http://www.geocities.com/xsilverboarderx/test.html Also here is My page that i am currently workin
on i used the same thing just switched colors and used CSS: Silver Design Of Course with this
code u can change things around for ex. like background, border width or color, and cellpadding
cellspacing for diffe....
Looking for integrating, html, file, embedding
|
Searching Video's for integrating, html, file, embedding
See Also,
|
advertisement
|
|