PDA

View Full Version : Insert HTML page into another HTML page



scavok
16 Jun 2010, 06:02 PM
I have a program that I made that writes an html page with tables filled with data from the program. However, I want to add CSS and javascript auto-refresh scripts and so on, but the only dynamic content is the tables, so I don't want to have the program re-writing all of the header and CSS/javascript stuff everytime it's saved. File names would be constant and they'd always be in the same directory.

So basically what I need is a base html page that looks something like this:

[code]
<html>
<title></title>
<body>
<javascript stuff></javascript stuff>
<table>
<!-----Import dynamic html table file that the program writes-----!>
</table>
</body>
</html>

Any ideas on how I can accomplish this?

carnavia
17 Jun 2010, 04:52 AM
Turn the file into a php file.

thefile.php


<html>
<title></title>
<body>
<javascript stuff></javascript stuff>
<table>
<?php include("filename.html"); ?>
</table>
</body>
</html>


I'm not sure what you name your html files, or when you would want them to appear. Can I have more details?