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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

whats better than iframe

Status
Not open for further replies.

Alanukdude

Technical User
Nov 13, 2002
20
GB
Hi,

Im working on an Intranet and would like to seperate the content from menus.

I know i can use an iframe, but if the iframe is taller than the page, it has a scroll bar on it rather than increasing the table in size to accomodate. im happing with users scrolling if ther whole page is larger than there viewing area, but not to have to do it to the iframe also.

Is there a way to do this? I've seen similar ways with SSI, but not too sure how to implement it.

Thanks in advance

Alan
 
SSI is much better than IFrame. Iframe holds all the negative stuff that comes with frames and should only be used when there's no better, server-side solution. Depending on the language you use, you might have internal include functions available (for php include "file";) but if that does not work, you use the SSI like this:
Code:
<!-- #include file="myFile.html" -->
or 
<!-- #include virtual="path/to/myFile.html" -->
When using SSI, take note of the following:
1. By default the extension working with SSI would be .shtml. If you want to use other extensions, make sure server parses them for SSIs first.
2. File will be included as is. That means, if you start a table in the main document like this:
Code:
<table cellspacing="0" cellpadding="2" border="0">
 <tr>
  <td> Menu </td>
  <td>
   <!-- #include file="main.html" -->
  </td>
 </tr>
</table>
Included main.html should only contain text relevant to what is in that cell, not all the <html><head><body> stuff. Main html should therefore look something like:
Code:
<div>
 <h1>Title</h1>
 <p>
  Main text
 </p>
</div>
[code]
 
that's for all that, that's exactly what i needed to know.

im using brswebweaver which has ssi support, so hopefully this will do the trick.

thank you.
 
i tried it with brswebweaver... and failed.

there only solution... put it in an iframe.

anyone know of small webservers that support SSI?
 
If your question has to do with avoiding two scrollbars, then use a Frameset:

<html>
<frameset cols="30%,*" frameborder=0 border=0>
<frame src="menu.htm" name="MENU" scrolling="no">
<frame src="Page1.htm" name="PAGE" scrolling="yes">
</frameset><noframes><body>
<a href="menu.htm">Click here</a>
for noframes version
<body><noframes</html>

There are many advantage to framesets but people seem to only dwell on the one or two minor disadvantages.



Clive
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top