HTML Question - frames an/or alternatives - Need Serious Help

anonymouschris

Diamond Member
Jan 17, 2001
3,101
0
0
Here is the scenario...

I've created a webpage that is basicall a table with three rows with an iframe nested in the middle row.

Here are the problems...

- for some pages I want the middle row (iframe) to have a fixed height and for other pages i want it to be dynamic (size of the page loaded into iframe). if i set the middle row height, then it will work incorrectly for the links in which i want the middle row to expand to the height of the new page. i guess my question is is there a way i can make the middle row the size of the page loading in the iframe?

- the second problem i am having is related to the scroll bar. is there to eliminate the scroll bar in the iframe and make it all work with just the main scroll bar?

- last question is how to do i get rid of the bookmarking problem. is there a script i could run that will update the url to the iframe URL?

If there is an alternative to frame that will work please don't hesitate to point me in the right direction. Thanks!
 

phaxmohdem

Golden Member
Aug 18, 2004
1,839
0
0
www.avxmedia.com
Sounds like you got yourself one crazy arse web page going there. Do you happen to have a link to it? I can't really picture in my head too well what you are trying to do.

As for frames, I personally don't use them as they are tacky in my opinion. And for tables, As far as my HTML knowledge goes you have two options, Dynamic or Static width/heights as you mentioned. I have never heard of a hybrid. Generally speaking you should design the other parts of your page to accomodate a table if it needs to enlarge/contract on different pages. Or you could always just do things the hard way and hard code the dimensions into every page (unless you have dynamic content)

Again, a link would be beneficial, and could get many more intelligent responses than mine once we can analyze what exactly you are trying to pull off.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
A layout table with just three rows is begging to be converted into divs. You can tack the lowest one to the bottom with a static height (size, not position) and then the middle one will resize with the page.

The best solution to the bookmarking problem is to stop using frames. It's always really icky if you have lots of navigable content in a frame. You can encode the iframe location into the url but that would be a lot easier with a server side language of some sort and it's still not as nice as a plain page. What are you using?

If all you're trying to do is get scrollable content in between a header and footer then I think you can do that without frames. I've never done it, or examined the code of pages where I've seen it but I believe it would be something like giving the header and footer divs absolute locations (so they never move) and giving them a higher z-index than the rest of the page (so they always appear on top). That would also make the scroll bar work the way you want it. I'm sure you can do it with the header, although I'm not entirely sure how the footer would work...
 

anonymouschris

Diamond Member
Jan 17, 2001
3,101
0
0
the site is fabricatethgought.com - its just a project that i have going on with some friends. most of the links don't work yet because i dont have those pages created.

i think its pretty obvious how the three rows are divided if you look at the page, actually come to think of it 5 rows, the two lines being a row on its own. i am really new to desiging websites and have to research while i go so pls bare my ignorance

i want every link to be fixed size in the middle frame except for the submissions page (will be running gallery 2) and the blog/forums (will be running phpBB) forum. i am sure you could figure out how the site would work better if those two pages were dynamic.

i dont know if i need frames or not, does that help or do you need more info.

basically, i want sight to work like this
http://browse.deviantart.com/wallpaper/apple/

the content changes, but the top part of the page doesn't change, and the url matches the content change. also, there is only one scroll bar. does anybody know how to do that? am i completely off course?

THANKS!

 

anonymouschris

Diamond Member
Jan 17, 2001
3,101
0
0
okay, so reading further i think javascript will do what i want, but i have no idea where to start. any help would be appreciated.
 

phaxmohdem

Golden Member
Aug 18, 2004
1,839
0
0
www.avxmedia.com
Deviant arts website appears to be constructed of tables. When I make a website with a common top/bottom bar such as my latest website I made for my school:

http://www.nwmissouri.edu/dept/ctl/index.html

First off I create a template file. In this template you create the top navigation bar exactly the way you want it displayed on all pages, then section off the middle part where your content will be. ( I generally just make this one big table cell, so I can do anything I want inside of it like create another table(s) or whatever... its like its own webpage ). Then make the bottom part as you desire and save the file as template, or whatever name you want. Then everytime you make a content page load up this file, save it as its new name, change the <title>, and any other content that will differ slightly and save it as its own page. By linking these pages together, they will maintain a uniform appearance, but you can change the content in each individual page.

Deviant arts system is a little more advanced than that, but its the same basic concept. as a general rule just say "NO" to frames. Tables will do the job quite nicely ussually, and the pages look much more professional.
 

anonymouschris

Diamond Member
Jan 17, 2001
3,101
0
0
yes, that is the way my sight is created right now. however, the problem comes in when i start getting a lot of pages. one of my pages will be a gallery script. this script will automatically generate new pages and i don't want to have to manually configure each page with a new link, that kind of defeats the purpose of using a script. this will also be a problem in the forums section as there will be a lot of pages there as well. if i just make a new page for each link, i will have problems bookmarking the multiple pages for the gallery and the forum.

although i dont understand it fully, i think there is a javascript that will do the trick.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Holy crap, I thought you were trying to do something much more complicated :confused::p

Generally speaking, using javascript for layout is not nice and I don't think it'll help you much here. What you're basically looking to do is have a common header/footer without duplicating code? That's most easily accomplished with some sort of server side tool. The simplest would be ssi (server-side includes) which just includes some other page in the current one. I don't remember the exact syntax but you'd do something like this:
<!--#include page="header.html"-->
and the web server would paste header.html in. That's sort of old, inflexible technology but pretty widely available.

If you're using php than something like:
<?php include("header.html"); ?>
will do the trick, and there are lots more ways to accomplish the same thing slightly differently. This is much more powerful than ssi but maybe not available (although I see it is installed on your server). Pretty much any other server-side language will have similar mechanisms.
 

Zugzwang152

Lifer
Oct 30, 2001
12,134
1
0
Originally posted by: kamper
Holy crap, I thought you were trying to do something much more complicated :confused::p

Generally speaking, using javascript for layout is not nice and I don't think it'll help you much here. What you're basically looking to do is have a common header/footer without duplicating code? That's most easily accomplished with some sort of server side tool. The simplest would be ssi (server-side includes) which just includes some other page in the current one. I don't remember the exact syntax but you'd do something like this:
<!--#include page="header.html"-->
and the web server would paste header.html in. That's sort of old, inflexible technology but pretty widely available.

If you're using php than something like:
<?php include("header.html"); ?>
will do the trick, and there are lots more ways to accomplish the same thing slightly differently. This is much more powerful than ssi but maybe not available (although I see it is installed on your server). Pretty much any other server-side language will have similar mechanisms.

include doesn't use ()'s ;)

include "./functions/header.html";
 

phaxmohdem

Golden Member
Aug 18, 2004
1,839
0
0
www.avxmedia.com
Yes If you use some sort of server side language, you can use the same page, but teh dynamic content will change, and the link up to should chagne slightly to, so that the server knows what page to pull up. Ex. www.fabricatethought.com/gallery.php?id=123 the links on that page would link to the same page but change the id # like www.fabricatethought.com/gallery.php?id=135 or whatever other number.

a script at the topf of the php page would take that variable "id" query a database to pull out any information relevant to that id number and format it into a display_block or some other variable to be placed in the center part of that same page. Kinda confusing to explain, if you're seriously looking into making a site with dynamic content like that, go out and purchase a book on PHP/MySQL, or ASP, or whatever server side language you want to use.
 

anonymouschris

Diamond Member
Jan 17, 2001
3,101
0
0
thanks so much guys. i think you have put me on the right track. i will read up on in this weekend and hopefully have it figured out by Monday.