[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Include page in other HTML page without iFrame

Posted on 2013-02-04
4
Medium Priority
?
448 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
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 2000 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 44

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

Industry Leaders: 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 how to create an extensible mechanism for linked drop downs.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

810 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