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!

Question / HTML and #include

Status
Not open for further replies.

StevenB

IS-IT--Management
Sep 25, 2000
247
US
Hello all,

My first exposure to web sites was through ASP, so I am familiar with some ASP stuff. One thing I found incredibly helpful was the #include command, so that you could dramatically reduce the amount of code in each page. For example, we use include files to separate the header, menu, and content of a simple non-frames layout.

Now I am actually jumping into web development myself, in a simple HTML format, and I'm wondering, what if anything does straight HTML offer you that accomplishes the same, apart from frames?

Any ideas would be much appreciated.

Thanks,

Steve
 
Hi mate,

HTML has no options of this type but using SSI can give you a lot more choice.

<!--#include virtual=&quot;/header.html&quot; -->

Just do a serch in google for SSI and that should bring up quite a few sites.

Hope this helps Wullie

sales@freshlookdesign.co.uk

The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
There is the <iframe> it is a bit different than the standard frame. New browsers support it and you can set it to have no border or scrollbars and have full positioning ability via css. DeZiner
Never be afraid to try something new.
Remember that amateurs built the Ark.
Professionals built the Titanic
 
OK folks, so far iframes may be the way to go. I can't get SSI to work with my provider, and DIV doesn't seem right for me.

So, I now have a hockey web site that essentially has 3 columns. The left is a menu with options like &quot;Player Statistics&quot;. The middle (fat column) is for putting the main content of the day. This is a 400-pixel wide iframe with no scroll bars or borders. The right is just another small column for, well, for something at some point.

I'm building the site primarily for 800x600 resolution right now, so it's essentially a 200-400-200 breakdown, that's really just one big <tr> with three <td>s. The iframe tag is inside the middle <td>s.

The way my menus are working right now, if you click on Player Statistics it opens a new Window with the statistics (just text files right now). What I would like to happen is, if I click on Player Statistics, that file should open in the same space as my original iframe. That is, in the 400-pixel center column.

How can I pull this off? Or can I?

Also, I don't suppose there is any way to make the iframe flexible in width, so that I can make it larger to fill up at 1024x768 screen but still legible for 800x600?

If you promise not to laugh, you can check out my progress at:


Thanks,

Steve
 
Hi

Add a target to your link (which is the name of your IFrame)

a href=&quot;stats.html&quot; target=&quot;mainbody&quot;

That should open your link into the iframe for you.

Regarding the resizing, if it is a big table I would just try setting the widths to use a % instead of a fixed number. 20% 60% 20% You may have to tinker with it a bit and see.

Hope this helped some
Moira Moira
&quot;Those that stop learning, stop living.&quot;
 
I'm OK with the % to make the table grow and shrink dynamically, but that won't make the iframe grow and shrink dynamically, will it?

Or can I give an iframe a % width?

 
Not positive but I don't think so. The only way I really know of to make it &quot;liquid&quot; would be this sort of setup

<frameset rows=&quot;10%,80%,10%&quot;>
<frame name=&quot;FA&quot; src=&quot;FA.htm&quot; scrolling=no frameborder=&quot;0&quot;>
<frameset name=z cols=&quot;0,*,0&quot; onload=&quot;javascript:z.cols='20%,*,20%'&quot;>
<frame name=&quot;FBL&quot; src=&quot;about:blank&quot; frameborder=&quot;0&quot;>
<frame name=&quot;FBM&quot; src=&quot;FA.htm&quot; frameborder=&quot;0&quot;>
<frame name=&quot;FBR&quot; src=&quot;about:blank&quot; frameborder=&quot;0&quot;>
</frameset>
<frame name=&quot;FC&quot; src=&quot;FB.htm&quot; scrolling=no marginwidth=&quot;10&quot;
frameborder=&quot;0&quot;>
</frameset>

Maybe someone else here (read as smarter than I hehe) will be able to give you more info

Warmest Regards
Moira
&quot;Those that stop learning, stop living.&quot;
 
Right -

No you can't give an IFrame a dynamic size. which is a little annoying.

BUT - all hope is not lost, there is one last thing you can try.

Have a look at this little DHTML app - from Twin Helix.

it's great for doing what you want to do, it doesn't use frames at all - it's resizeable and it lets you load in other pages dynamically which is damn fast!


if you need any help setting it up - i've had a bit of experiance with it already - but it's fairly easy!

have a play about with it - but I think it will help you out loads.

Good luck!!

Martyn

Let me know how you get on!
 
You could use the HTML object tag, a lot easier than messing with any kind of frames etc

<object type=&quot;text/x-scriptlet&quot; width=&quot;%&quot; height=&quot;%&quot; data=&quot;yourpage.htm&quot;>
</object>

But dang, SSI is still the best option!



::
 
OK, thanks all for the great suggestions. Truth be told, I really want to do this in ASP, but my provider doesn't support it, and the 5 minutes per week I am spending on this just don't merit the time to research and $$ to pay for a separate hosting service that supports ASP.

Meanwhile, I have it working pretty nicely now with the iframe alone, thanks to everyone's help. It's actually pretty cool.

Now, if only I could figure out a way to format the output from my Access database nicely... (^_-)

Thanks all!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top