Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

page within a page, please help

Status
Not open for further replies.

Tjobbe

Technical User
Oct 4, 2002
10
0
0
GB
I'm looking to figure out how to create a basic html page and then from within that page, have another seperate html document displayed within it... any ideas anyone??
Tjobbe
 
include?
<!--#include file=&quot;page.htm&quot;--> Hope that helps
admin@onpntwebdesigns.com
 
Maybe iframes...

eg.

<iframe width=&quot;50%&quot; height=&quot;100px&quot; src=&quot;otherpage.htm&quot; frameborder=&quot;yes&quot; scrolling=&quot;yes&quot;></iframe>
 
There's a number of ways,

You can use iframe as suggested above, ot just as simple is to use an object tag:

<object type=&quot;text/x-scriptlet&quot; width=&quot;200&quot; height=&quot;300&quot; data=&quot;included_page.htm&quot;>
</object>

This gives you good control over the size etc of what you want to include.

What onpnt has said <!--#include file=&quot;page.htm&quot;--> is SSI, its recommended for things like nav bars etc! But there's more to it than just that. you may need to rename your files to .shtml to get it to work, and it will include everything with is in the included document which (imho) makes it more suitable for page content which may change regularly.


É

endamcg-logo1b.gif

 
Hi,

A note on SSI from personal experience.

Do not use this: <!--#include file=&quot;page.html&quot;-->
The reason is this. If you were in a subfolder of the root and you wished to call a page from a different subfolder then one would assume you would just do this <!--#include file=&quot;/subfolder/page.html&quot;-->, however this produces an error. Instead use this <!--#include virtual=&quot;/subfolder/page.html&quot;-->, and then you can put the / before the filename if you are specifying the exact location of the file to be included.

Hope this helps!
greenjumpy.gif
NATE
design@spyderix-designz.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top