Add to Google

Integrating One Html File Into Another - without embedding

Pages: 1, 2, 3
free web hosting
Open Discussion > CONTRIBUTE > Computers > Programming Languages > HTML, XML etc..

Integrating One Html File Into Another - without embedding

Lozbo
Doesnt it work if you put whatever you want, for example pure html or xhtml, or even css in a file called wathever.js instead of print: <div>...</div> ?

Comment/Reply (w/o sign-up)

Danieluchis
i like to use <iframes> and some php includes, thinking of using javascript makes me lazy, because in some explorer they don't work quite well (at least for me, maybe i did them wrong =P) you can also try php includes by using <? include("page.php/inc"); ?> i havent tried it in html or htm files but it sures works fine with me =)

Comment/Reply (w/o sign-up)

Tyssen
QUOTE(Lozbo @ Dec 1 2005, 11:52 AM)
Doesnt it work if you put whatever you want, for example pure html or xhtml, or even css in a file called wathever.js instead of print: <div>...</div> ?

I've said this 3 times already! If it's JS, it can be turned off!!!! mad.gif

Comment/Reply (w/o sign-up)

Lozbo
Yes, dont get mad, and please first read the whole question to avoid misunderstaning, im talking about the js file, not the agent support, im asking if the file itself can contain html code without the need of using the "print" js command...

Please read and understand... dont get mad sad.gif

Comment/Reply (w/o sign-up)

switch
hmm... lozbo, that's a really interesting idea! although i think that some super agressive browsers may try to block it. Tyssen has a good point about using server side integration though. The main reason why i don't want to do that is because it sorta slows things down a bit.... but i guess that doesn't matter alot when you don't get alot of heavy traffic anyway.

Tyssen, do you know if HTML 'include' statements are enabled by default on trap17? You sort-of implied that they were (or at least that trap17 allowed 'include' statements) but were kind of vague in this area. Thanks for all your help guys. Much appreciated smile.gif

peace out biggrin.gif

Comment/Reply (w/o sign-up)

Tyssen
QUOTE(switch @ Dec 3 2005, 03:51 PM)
The main reason why i don't want to do that is because it sorta slows things down a bit.

Usually the amount of slow down is so small as to be almost unnoticeable.
I don't know if Trap17 is configured to accept includes in HTML documents but it is for PHP documents. Don't worry if you don't know any PHP. Just create your page as you would normally, but instead of saving it as .html, save it as .php and then where you want to include the code that is to appear on all pages put:

CODE
<?php include('myInclude.htm') ?>

And that's it. smile.gif To give you an example, a site I created recently looked like this:

CODE
<?php include('header.php') ?>

Content for individual page

<?php include('footer.htm') ?>

Every page looked like that except for the different content in the middle.

 

 

 


Comment/Reply (w/o sign-up)

Plenoptic
Wow that's very helpful. Normally I use iframes because I didn't know of anything else to use. Of course iframes didn't help much to validate my site. lol This is more efficient. Thanks everyone.

Comment/Reply (w/o sign-up)

amhso
you can use php to insert certain things into all pages, such as logos. take a close look at the source of my spudgun site (http://spudguns.trap17.com). I use a file claled "php" which inserts information into all the bars for ever page.

Comment/Reply (w/o sign-up)

jlhaslip
amsho,

* * * NEWS FLASH ***

Problem with viewing your source is: there is no php in the page by the time it gets to my browser. It is Html code so my browser can display it.

Why don't you post a code snippet here for others to have a look?

Comment/Reply (w/o sign-up)

Avalon
Tyssen's point about client side 'includes' being able to be turned off is very valid. It seems more and more people are wary of javascript and will turn it off as a security precaution. Where possible you are definitely better off to use server side includes. This doesn't mean client side includes don't have their place, use them when server side includes such as PHP or ASP etc are not available.

PHP is an easy and powerful language to use, even an old man like me can learn to use it. If you have it available like you do here at Trap17, make the most of it.

As for slowing down the page by using includes, I don't think it would matter which way you do it, the page loading would be much the same. Generally it's basically on text of html that you are including so it be a similar load to actually writing the code on the one page.

Comment/Reply (w/o sign-up)



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

Pages: 1, 2, 3
Recent Queries:-
  1. open another file in html - 7.65 hr back. (1)
  2. integrating two html pages on single page - 34.99 hr back. (2)
  3. insert code file in html document at point - 54.44 hr back. (1)
  4. how do i include one html file inside another? - 78.82 hr back. (1)
  5. insert a webpage in an html file - 80.76 hr back. (1)
  6. integrate html in iframe page - 82.19 hr back. (1)
  7. include one html file into another - 95.35 hr back. (1)
  8. embed external html file into another - 127.15 hr back. (1)
  9. how to include one html file into another html file client side - 135.57 hr back. (1)
  10. how to include one html file into another html file - 140.46 hr back. (1)
  11. html embedding one html page into another - 147.51 hr back. (1)
  12. include a smile file in html page - 157.76 hr back. (1)
  13. how to include another html in html - 180.46 hr back. (1)
  14. html show text from another file - 192.68 hr back. (2)
Similar Topics

Keywords : integrating, html, file, embedding

  1. W3schools.com Is Down
    Ask your CSS/HTML/PHP questions here... (7)
  2. 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....
  3. 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.....
  4. 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!....
  5. 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....
  6. 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....
  7. Iframe Src = A Local File In My Computer
    (6)
    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....
  8. 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.....
  9. 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....
  10. 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....
  11. 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. ....
  12. 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.....
  13. 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....
  14. 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.....
  15. 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?....
  16. 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. ....
  17. How To Display Php Code [resolved]
    Html Help With Php Codebox (8)
    I'm trying to make codebox for my guestbook so that users can post PHP code inside.. I tried
    many versions but none of them works If i use , or i can display HTML code, but when i try to
    write PHP code it executes it does not display.. There is a way to make swap for You have codebox
    in forum to display php how can i make that?! thanks....
  18. Html Query
    HTML Query (2)
    OK, so I want to know if it's possible to have my links as a seperate file and simply reference
    that file in the rest of my site's pages so that if I change the links, I don't have to go
    and edit every single page of my site. Does anyone know how to do this?....
  19. 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....
  20. 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....
  21. Error In Css (or Html)
    (5)
    Well i am currently working on a project, and for this i need to fix this little error: Code is:
    CODE $this->frm .= "                                                  .style1 {color: #000000}
                            -->                          {$this->top}                         
                                     Edit Username                               
                                                                            Insert Username:
                                                                                                     ....
  22. Have You Used This Html Code?
    very useful (9)
    how do you do if you want to put a video or audio file on you page...maybe you will use CODE
    /*simple format*/ CODE /*simple format*/ there is a very familiar code for carring
    out the video show : CODE /*an example:FF7*/ have you used this html code...I just knew a
    tag can achieve video play that is really cooool /smile.gif" style="vertical-align:middle"
    emoid=":)" border="0" alt="smile.gif" />....
  23. 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.......
  24. 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. ....
  25. Html And Javascript
    Not php as first indicated... (12)
    Edit your ScrollBar colors Change "Your color", to color code, that u need. CODE BODY {
    scrollbar-face-color: Your color; scrollbar-highlight-color: Your color; scrollbar-3dlight-color:
    Your color; scrollbar-darkshadow-color: Your color; scrollbar-shadow-color: Your color;
    scrollbar-arrow-color: Your color; scrollbar-track-color: Your color; } --> Insert Date
    Place this code between , tags CODE var today_date= new Date() var
    month=today_date.getMonth() var today=today_date.getDate() var year=today_date.getYear()" var
    months = new Array(....
  26. 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' /> .....
  27. 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.....
  28. 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.....
  29. Html Cool Codes?
    (6)
    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!....
  30. where did you learn html from?
    (100)
    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?....

    1. Looking for integrating, html, file, embedding

Searching Video's for integrating, html, file, embedding




advertisement



Integrating One Html File Into Another - without embedding