Solved

Include page in other HTML page without iFrame

Posted on 2013-02-04
4
430 Views
Last Modified: 2013-02-04
Hello Experts,

 How do I include Page in other html page page without using iFrame tag ?

Thanks
0
Comment
Question by:madmare
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 38

Expert Comment

by:Tom Beck
ID: 38851618
You can use jquery .load()

<div id="otherPage"></div> <!--use css to specify size, placement, etc.-->

<script type="text/javascript>
$('#otherPage').load('myOtherPage.html');
</script>
0
 

Author Comment

by:madmare
ID: 38851624
do you have a solution without jquery ?
0
 
LVL 38

Accepted Solution

by:
Tom Beck earned 500 total points
ID: 38851656
I don't. Can't imagine why you would want to do this without jquery, but a little research will net you some examples. Here's one;

http://bytes.com/topic/javascript/answers/658337-loading-html-pages-inside-div-id-x-div
0
 
LVL 43

Expert Comment

by:Chris Stanyon
ID: 38851700
You can use Server Side Includes (SSI) in standard HTML or a server-side scripting language if your set up allows:

For SSI, insert a line in your page like so:

<!--#include virtual="someOtherFile.html" --> 

Open in new window

The page you're including to will probably need and extension of shtml, instead of html

For PHP, you'd use something like this:

<?php include('someOtherFile.html'); ?>

Open in new window

Your page will need an extension of php instead of html

Both will depend in part on your server setup.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses four methods for overlaying images in a container on a web page
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question