Frames vs tables in HTML?

5 messages
06/12/2005 at 20:08
I'm trying to do a directory listing page and like the default one generated for me by apache, so I don't have an index.html file or variant thereof.

To the bottom of this listing I'd like to tack a php search page, which is basically a table of unknown height, based on how many search results are returned.

I was thinking of creating an index page with two frames, then loading the top one with the directory listing and the bottom one with the php search page.

But I know lots of people don't like frames for some reason, so I was wondering if I could do it easily as two tables? I wouldn't know how to load my directory contents into a table, can it be done?

Maybe there's a better way than either of those?
06/12/2005 at 21:01
Frames are essentially evil for a variety of reasons concerning usability, accessibility, search engine indexing, bookmarking etc etc... there's really no excuse for them on a modern public website..

But... if this page isn't public and is basically for your own use (assuming it is) then it's an easy way of achieving a desired effect..
06/12/2005 at 21:04
fulltilt wrote
I'm trying to do a directory listing page and like the default one generated for me by apache, so I don't have an index.html file or variant thereof.


a php script could give you a listing of your directory in a html format...

fulltilt wrote

To the bottom of this listing I'd like to tack a php search page, which is basically a table of unknown height, based on how many search results are returned.

I was thinking of creating an index page with two frames, then loading the top one with the directory listing and the bottom one with the php search page.


why put everything on one page ??


fulltilt wrote

But I know lots of people don't like frames for some reason, so I was wondering if I could do it easily as two tables? I wouldn't know how to load my directory contents into a table, can it be done?

Maybe there's a better way than either of those?


Frames are generally poo pooed as they can be a pain when dealing with search engines and/or other screen reading devices (pda, mobiles etc..) plus if you start loading content into more than one frame at once then you need to start using a bit of javascript, as you are not bothered about google or using more than two frames I cant think of a good reason not to use them.

hth

require_once("whitty_comment.txt");
06/12/2005 at 21:06
CSS

put your php search thing in a <div> , and the same for your php file list.

You could then write some php to iterate through the files in a directory and echo them out to an unorderd list.

Not played with php proper since summer otherwise I probaly could of wrote a quick script. Theres stuff which already do what you want on freshmeat and sourceforge, would probaly take 10 mins adding your search to the bottom.
06/12/2005 at 23:00
Thanks for the suggestions, decided to go with frames after all, at least for now and I'm very happy with the result.

img.photobucket.com/albums/v310/silentmemory/visordown/Examples/chuffed.jpg

Next step is maybe to embed a player onto the page, expect more questions soon
Your say
email image
5 messages
Forum Jump