Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Include page in other HTML page without iFrame

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

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

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
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…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
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 …

636 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