It's not really possible with html. But you can put the whole div into a javascript function and call that function to print out the div code. Something like
Main Topics
Browse All TopicsI know that you can use an iframe to embed one html page in another page. But is there anyway to embed just one div or table from a page into another page?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Thanks to you both,
I know I can get html out of the webpage that a javascript is in by using document.getElementById("t
But how can I get it out of another page? Is there something possible like document("http://myotherwe
You can add the content of the page with the IFRAME as you do
A workaround is to pass on the source of the IFRAME an extra param like
Mypage.asp?CalledFromIfram
Inside your page you can check that param and if it is true then you can hide all the other content
You can do this also with HTML pages on the onload event or by adding the script on the bottom of the file of your HTML page and by requesting location.url to see if the attribute exists.
Another work around is to put the div in an page alone
and call it from both pages with the INCLUDE FILE attribute
<!--#include file ="somefilename"-->
This approach requires ASP files
If using frame then why need to embed it again? As if you use frames the content of the frame should be already included in the page. If you set the frame to so small as invisible and extract the content within then I think you are having too much time on your hands. :P
anyway, if follow ryancys code, you might have to use the follow code, where myarea is a div or something to hold your embedded content and yourframeobject is the target content.
Business Accounts
Answer for Membership
by: ryancysPosted on 2008-11-23 at 22:07:16ID: 23026851
>>But is there anyway to embed just one div or table from a page into another page?
Most probably you can refer to the div or table in another page, and then regenerate it by copy its HTML code.
If you talking about embedding, it only allow you to embed an URL, but not object in a page.