How do i can insert a html page into other html page?

11 replies
  • WEB DESIGN
  • |
Some of you have done this i hope i need some your intense to help me.

Background: I have a small page that need to be embeded into a bounch of other html pages.

1. Please provide the html chunk that I can use to embed the small page in to other html pages.
2. Is there a way of not using iframe? Can I use <Object> or <embed>? How?
#html #insert #page
  • Profile picture of the author phpbbxpert
    Your better off changing the extensions to PHP and making templates out of it.
    Then just using an include to include your small page where ever you want.
    {{ DiscussionBoard.errors[2863111].message }}
  • Profile picture of the author Silke
    I agree with phpbbxpert, that is the best solution
    {{ DiscussionBoard.errors[2863992].message }}
    • Profile picture of the author mrbrown123
      Do it with PHP like the above users said.
      {{ DiscussionBoard.errors[2864013].message }}
  • Profile picture of the author infoman66
    Originally Posted by kevinmariya View Post

    1. Please provide the html chunk that I can use to embed the small page in to other html pages.
    2. Is there a way of not using iframe? Can I use <Object> or <embed>? How?
    Yes, you can use simply iframe (unlimited nuber of times on the same page with different name).

    Sample:
    Code:
    <iframe src="yourpage.html" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" name="iframename" width="600" height="400">Sorry, your browser do not support iframe.</iframe>
    {{ DiscussionBoard.errors[2864092].message }}
  • Profile picture of the author ngseosept
    Using iframe makes the site organize and less code.
    {{ DiscussionBoard.errors[2868961].message }}
  • Profile picture of the author web.tech
    We can insert html pages into html pages with help embedded tag, but most of the browsers are not support. So the simple and best solution is, to change the html page into php, and include other(2) page into main page(1) with the help of includes function.
    {{ DiscussionBoard.errors[2879646].message }}
  • Profile picture of the author LosingMyHair
    First, you need to better state your need. What is the context? What is it for?

    The online advertisements we all know and love (like AdSense) use IFRAME and it works great.
    {{ DiscussionBoard.errors[2886472].message }}
  • Profile picture of the author badhim
    You can try to use SSI (Server Side Includes). Many hosting providers support them. Insert the following line into your html pages:

    <!--#include file="smallpage.html" -->

    The server will automatically replace it with the content of the specified file, before sending the html to the user.
    {{ DiscussionBoard.errors[2891778].message }}
  • Profile picture of the author jibin
    Here is the tutorial for including html in different ways...

    boutell.com/newfaq/creating/include.html
    {{ DiscussionBoard.errors[2898038].message }}
  • Profile picture of the author nitivation
    Don't use php.....

    <iframe> would work best. You can also customize it by adding forms.
    {{ DiscussionBoard.errors[2907208].message }}
  • Profile picture of the author dhirendra.gvt
    Banned
    [DELETED]
    {{ DiscussionBoard.errors[2907759].message }}
    • Profile picture of the author abdulquddus
      Hi

      I had one old script. I played with it and could finally make this thing here. The text scrolls (different page) and when we click on the link a new page opens and we can get back to the same scrolling page again.

      see the demo here: http://www.orangehyd.com/projects
      {{ DiscussionBoard.errors[2908529].message }}

Trending Topics