0

Hi I have a div question, on my home page I have a menu its in a div. The body has another div. Can I put or somehow call a specific div content from another page into the div of the homepage body when I call for it from my menu. or how can I put the other page inside the body div with out using Iframes. For example:

<html>
<body>
    <div>content from the another_page.html div.</div>
             or
            <div>another_page.html inside here</div>
</body>

Can this be done? Thank you in advance.

Amarnath Balasubramanian
  • 9,300
  • 8
  • 34
  • 62
st2011
  • 460
  • 1
  • 5
  • 10

3 Answers3

2

You can use jQuery for solving this.

Please refer to this for loading div from another page inside div:

Load content of a div on another page

And for loading another page inside div:

loading html page inside div

Community
  • 1
  • 1
Bibek Maharjan
  • 549
  • 2
  • 5
  • 15
0

You have a number of ways to do this, as commented already, ajax is probably what is used in most cases. However it can also be done using PHP, jQuery, and an HTML object.

Link to similar question: here

Community
  • 1
  • 1
BenMann
  • 248
  • 3
  • 15
  • You're absolutely right. I should've formulated that better. It's rather a technology that can be implemented in a number of ways, eg. HTML objects, etc. – BenMann Dec 15 '13 at 11:20
0

You could try this and style it with css

<body>
<iframe src="page1.html">

</iframe>


<iframe src="page2.html">

</iframe>
</body>
iamkarsoft
  • 21
  • 2