Solved

Include page in other HTML page without iFrame

Posted on 2013-02-04
4
419 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
  • 2
4 Comments
 
LVL 38

Expert Comment

by:Tom Beck
Comment Utility
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
Comment Utility
do you have a solution without jquery ?
0
 
LVL 38

Accepted Solution

by:
Tom Beck earned 500 total points
Comment Utility
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 42

Expert Comment

by:Chris Stanyon
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…

744 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now