Click to See Complete Forum and Search --> : Are frames pages truly evil? If so, are they my only option?


bluecaterpillar
03-03-2006, 10:10 AM
I'd really like to set up my site so that users can scroll through articles without scrolling the whole page. What I have now is a three-column table and I would like each of the columns to be "scrollable" on their own.

But I read and hear bad things about frames pages. I know how easy they are to make because I did one in an XHTML class - but even my teacher said she doesn't like them and that they aren't an ideal way to set up a site because they're not always supported etc.

Is there another way I can allow users to scroll these columns individually? If not - what's the consensus on frames pages?

Thanks, Rebecca

johneva
03-03-2006, 10:24 AM
Yes they are!

You should use either scrollable divs or PHP includes depending on your needs.

Scrollable Divs (http://www.fourlevel.com/nimbus/textarea/scrollable3.htm)

PHP Includes (http://www.tizag.com/phpT/include.php)

Going of what you have said sounds like you need a scrollable div.

hardcore_web
03-03-2006, 12:26 PM
or u could use this code...

<script type="text/javascript">

/******************************************
* Scrollable content script II- © Dynamic Drive (www.dynamicdrive.com)
* Visit http://www.dynamicdrive.com/ for full source code
* This notice must stay intact for use
******************************************/

iens6=document.all||document.getElementById
ns4=document.layers

//specify speed of scroll (greater=faster)
var speed=5

if (iens6){
document.write('<div id="container" style="position:relative;width:175px;height:160px;border:1px solid black;overflow:hidden">')
document.write('<div id="content" style="position:absolute;width:170px;left:0;top:0">')
}
</script>

<ilayer name="nscontainer" width=175 height=160 clip="0,0,175,160">
<layer name="nscontent" width=175 height=160 visibility=hidden>

<!--INSERT CONTENT HERE-->
<p><font size="2" face="Arial">-</font><font size="2" face="Arial"> DHTML is the
combination of HTML, JavaScript, and CSS</font></p>
<p><font size="2" face="Arial">- DOM stands for Document Object Model</font></p>
<p><font size="2" face="Arial">-</font><font size="2" face="Arial"> DHTML allows
content on a page to change on the fly, without reloading the page</font></p>
<p><font size="2" face="Arial">- CSS allows for the separation between content
definition and formatting</font></p>
<p><font size="2" face="Arial">- CSS stands for Cascading style sheet</font></p>
<p><font size="2" face="Arial">- </font><font size="2" face="Arial"><a href="http://www.dynamicdrive.com">Dynamic
Drive</a> provides free, cut and paste DHTML scripts</font></p>
<!--END CONTENT-->

</layer>
</ilayer>

<script language="JavaScript1.2">
if (iens6)
document.write('</div></div>')
</script>

<table width="175px"><td><p align="right">
<a href="#" onMouseover="moveup()" onMouseout="clearTimeout(moveupvar)"><img src="up.gif" border=0></a> <a href="#" onMouseover="movedown()" onMouseout="clearTimeout(movedownvar)"><img src="down.gif" border=0></a></p></td>
</table>

<script language="JavaScript1.2">
if (iens6){
var crossobj=document.getElementById? document.getElementById("content") : document.all.content
var contentheight=crossobj.offsetHeight
}
else if (ns4){
var crossobj=document.nscontainer.document.nscontent
var contentheight=crossobj.clip.height
}

function movedown(){
if (iens6&&parseInt(crossobj.style.top)>=(contentheight*(-1)+100))
crossobj.style.top=parseInt(crossobj.style.top)-speed+"px"
else if (ns4&&crossobj.top>=(contentheight*(-1)+100))
crossobj.top-=speed
movedownvar=setTimeout("movedown()",20)
}

function moveup(){
if (iens6&&parseInt(crossobj.style.top)<=0)
crossobj.style.top=parseInt(crossobj.style.top)+speed+"px"
else if (ns4&&crossobj.top<=0)
crossobj.top+=speed
moveupvar=setTimeout("moveup()",20)

}

function getcontent_height(){
if (iens6)
contentheight=crossobj.offsetHeight
else if (ns4)
document.nscontainer.document.nscontent.visibility="show"
}
window.onload=getcontent_height
</script>


its from dynamic drive.com hope this helps as well...

userlogin
03-03-2006, 12:34 PM
Nothing wrong with frames m8.

People who conjour up reason why are often misinformed, these are after all personal preferences, whilst the majority of people do not like the use of them, its possibly because they do not see the overall benefit of them and the over bearing fact that allot of sites use them because its convienient and simple to do.

My hosting company, all the FREE DNS name providers and professional hostname providers that do redirection ALL USE FRAMES so I WISH people would stop producing these reason why frames are so bad when they are only flying in the face of FACT!

Frames ARE useful and do a good job and have none of the inherited problems of using scripting methods which namely are Xbrowser problems with petty differences in achieving the same effect.

It really is down to personal choice m8 and If you have a gut feeling that Frames are for you, go with it.

johneva
03-03-2006, 12:35 PM
Problem with using Javascript is not everyone has it turned on so you site wont work for some peoples computer setups then though.

And using scrollable divs are far far easyer.

Nothing wrong with frames m8.

People who conjour up reason why are often misinformed, these are after all personal preferences, whilst the majority of people do not like the use of them, its possibly because they do not see the overall benefit of them and the over bearing fact that allot of sites use them because its convienient and simple to do.

Thats just not true fella.

I do understand the benifits of uing Frames but I also understand the drawbacks of using frames.

PHP Includes are far easyer as are scrollable divs and work just as good without the drawbacks of frames.

bluecaterpillar
03-03-2006, 12:42 PM
Thank you everyone for your suggestions!

The scrollable <div> sounds like the easiest option by far so I'll try that one first. But - could I just create a class in CSS like

.scrollable {overflow:auto;}

That would enable scrolling for the <td>s that extend outside the viewable area of the page? My table height is set at 100%.

I am going to go try that and see what happens - if not I'll set up a scrollable <div> as joneva suggested.

Thanks!

Rebecca

bluecaterpillar
03-03-2006, 12:52 PM
OK, that didn't work.

I put this in my CSS:

.scrollable{overflow:auto; position:relative;}

and did this for each of the three columns:

<td class="scrollable">

And... nothing happened. I added a border to make sure the page was picking up the CSS (I am going borderless except when I need to check layout etc.) and the border showed up, so I didn't mess up the CSS code... but still when I scroll within any of the three <td>s, the whole page moves.

Still working, but in the meantime if you have ideas of why that didn't work, I'm standing by and very appreciative!

Thanks, Rebecca

bluecaterpillar
03-03-2006, 01:01 PM
Do I have to make it to where the whole page won't scroll before I can get the individual table cells to scroll?

userlogin
03-03-2006, 01:01 PM
Never had a problem with my frames and all the web hosts and domain name providers/redirection services dont have a problem with them so if you wouldnt mind just putting into writing exactly wyour reason why, I would appreciate it above a this dismissive reply of 'its not true fella.'

I am one that does not see any problem with them seeing as all browsers support them and scripting is an issue for those browsers that cant understand the code or have it turned off or is really outdated... thats more of a problem in my books.

bluecaterpillar
03-03-2006, 01:06 PM
Probably this is just a matter of personal preference, huh? I am glad to hear what you wrote about frame pages, so I'll feel more confident using them if I decide to go that direction.

Rebecca

johneva
03-03-2006, 01:10 PM
The its not true comment was in relation to you say that I dont understand the benifits of using frames.

Here is one of many articles that explain the drawbacks of Frames.

Linky link (http://karlcore.com/articles/article.php?id=2)

But there is no need to get worked up about it anyways if you like using frames thats fine.

The way you do things is upto your personal prefrence at the end of the day.

I am just giving my opinion of the infomation I have read and been told.

johneva
03-03-2006, 01:11 PM
Do I have to make it to where the whole page won't scroll before I can get the individual table cells to scroll?

No it wont work trying to do it with a table cell.

A scrollable div is what was recommended.

the tree
03-03-2006, 01:15 PM
if you wouldnt mind just putting into writing exactly your reason why, The bookmarking issue. More requests = longer load time. Frames are disaster for text browsers. Spiders loathe them. Unnesersary proccessor load for the client. They don't do anything that can't be achived with less code.No it wont work trying to do it with a table cell.Sure it will, but the "auto" setting means "scroll if you need to" and 100% height means that they'll never need to scroll.

johneva
03-03-2006, 01:20 PM
Ah right there you go peeps.

bluecaterpillar
03-03-2006, 01:22 PM
OK Johneva, I did the scrollable <div> and it worked like a charm. Perfect! Thanks so much. Now just one more question... I know I should be able to find this in my HTML book but I can't - how can I pad it so that my text doesn't just run right up onto the scrollbar?

To see what I mean you can look at www.yourprowriter.com/friends.htm

Again, thank you very much for your help.

Rebecca

bluecaterpillar
03-03-2006, 01:23 PM
Like, I guess I mean, can I "pad" the scrollbar?

bluecaterpillar
03-03-2006, 01:25 PM
see www.yourprowriter.com/friends.htm - the text is smashed against the scrollbar. All our previous exchanges have disappeared for some reason.

Rebecca

johneva
03-03-2006, 01:27 PM
.margin {
margin: 30px
}


If your trying to do what I think.

You can just set the top or the right though too.


.margin {
margin-top: 10px;
margin-right: 40px;
}


And just set the class for the div or the table cell.

bluecaterpillar
03-03-2006, 01:30 PM
OK, but forgive the dumb question - to what element would I apply that CSS class? Just the paragraph the text is in, or the <img>, or could I apply it to the whole <td> ?

the tree
03-03-2006, 01:32 PM
The table cell I'd guess. Incedently, for such a simple design are tables really nessersary?

johneva
03-03-2006, 01:34 PM
I am not 100% it works adding it to the td tag but assume it will.

I am quite new to web design myself only been doing it for 6 months and I dont use tables nomore, I did breifly when I first started but learnt it was best not to, before lerning them very well at all.

bluecaterpillar
03-03-2006, 01:35 PM
Ha - for me they are. I wouldn't know how to lay out a page without building a table first!

I just tried it with each of the elements that bumps up to the scrollbar and it looks fine. But since using it with the table cell would be easier I'll try that too.

But in any case it looks like you've fixed me. If you were in Oklahoma City I'd take you to lunch. Thank you so much for all your help!

Rebecca

johneva
03-03-2006, 01:35 PM
Ah well I was too slow there.

Yes you can then.

bluecaterpillar
03-03-2006, 01:37 PM
The reason I thought not to add it to the <td> tag was because if the scrollbar is within the <td>, which it must be, then the extra space would be added to the right of it and not between it and the text.

johneva
03-03-2006, 01:43 PM
Ah right yep I get what your sayin there.

As for this lunch where we going then?

userlogin
03-03-2006, 01:46 PM
The major problems with frames are as follows:
1. Frames make it difficult for users to bookmark a page.
When someone wants to bookmark a specific page of your site, they cannot. The best they can do is bookmark the front page. ......1. Yeah, you can bookmark the indexpage of a frameset, where is this guy coming from? If your entry point is index.html and index.html is your frameset page then you will beable to book mark a web site and book mark it at the very least by the URL so that argument is right out the window.

2. The myth of shared navigation
Frames have often been seen as a way to ease the expansion of the site by making it possible to have pages of just content.....2. You can use frames to make up complex menu systems, all it takes is a bit of intuitive programming by the developer, how this is linked to frames being bad is beyond me, I cant see the argument in it as it is infact a pretty thin statement.

3. Frames create difficulties with "intuitive" navigation.
Sites with large amounts of content will feel this effect worse than small sites, but it is a concern nonetheless....3. When dificulties arise with navigation, it is down to bad programming. a frameset can make things far simpler and the menu only need change when required and the main display page can be left undisturbed whilst other frames change. Again I fail to see the valid argument in this statement in the above passage

4. Frames are less likely to be crawled effectively by search engines.
The major search engines look for content. Framed sites often have no content on the page that is most likely to be first-crawled by the searchbot.
4. Total bunk, the <META that YOU provide in your web page is what the search engines index, if you fail to provid this information then the search engine will cache a few lines of the BODY and that will be available under the main header link that you find on pages like google and yahoo. I have never had to pay for getting higher in the search engine results tables as I always provide adequate META data that will get me higher up the charts than other so called paid webs, even in the days when we used a FREE redirector domain name we came above other .tld's

5. Lost search engine referrals.
If a site does happen to be crawled, the visitor gets lead to a page that is likely lacking in primary navigation and is likely to get lost or lead up a dead end because that page does not have any navigational items. ...5. search engines should only index first page, and the argument of 'lacking navigations' should really be an admission in 'lacking forethought in a homepage link'. The main point being that you want people to BROWSE your site and not index and hot-link to your site content. lack of a homepage link is simply lack of programming.

6. Frames often needlessly eat up valuable screen real estate.
Sometimes designers of frames sites will create framesets that occupy a large amount of screen ...6. BUNK! Again! badly designed webs that do such things are simply down to bad programming, I have seen many examples of framesets in use, it is afterall down to the programmer having the forethought to account for this so called problem, some framesets that 'Eat up screen real estate' may have been designed like that. Frames SAVE on site traffic by minimising the number of requests that are made to the server.



I really see little point in continuing seeing as most of these remarks found in the link you provided can be disregarded.

johneva
03-03-2006, 01:58 PM
At the end of the day yeah I am new.

I can only go of what people say and my few experiances.

Now 99% of the people I have ever herd about frames from say they are bad and give pretty much the same reasons.

So sorry dude but I think I will still go with the other 99%.

Did you not read tree's message too?

But as I say I dont care if you prefer frames so why should you care that I dont like frames?

Or do you just enjoy causing arguments over nothing?

Why is it that when ever there is a new way to do thing people feel the need to cause arguments over which is the best way.

In the past couple of days I have been involved in arguments over wether divs or tables should be used, wether frames are good or bad and wether making sites compliant is a good idea or not.

On all of them I had simply made a comment about doing something the new way and they someone comes in and has to argue that the old way is better just for the sake of it.

Dude get a life!

the tree
03-03-2006, 02:21 PM
1. Yeah, you can bookmark the indexpage of a frameset, where is this guy coming from? [...]Once you move around in a frameset, you wont be able to bookmark that. This is particuarly annoying for people with no technical interest.

2. You can use frames to make up complex menu systems, all it takes is a bit of intuitive programming by the developer[...]Why use intutive programming when you can use good programming?

3. When dificulties arise with navigation, it is down to bad programming[...]Such as using a frameset.

4. Total bunk, the <META that YOU provide in your web page is what the search engines index, if you fail to provid this information then the search engine will cache a few lines of the BODY[...]The point is that search engines will feel no need to go any further than the one document and assuming that your pages are in some way different from each other, one set of meta elements isn't enough.

5. search engines should only index first page[...]Speaks for itself.


6. BUNK! Again! badly designed webs that do such things are simply down to bad programming, I have seen many examples of framesets in use, it is afterall down to the programmer having the forethought to account for this so called problem[...]How? By using some unreliable javascript? By meaninglessly doubling up on navigation?

Frames SAVE on site traffic by minimising the number of requests that are made to the server.If you have a frameset with 2 frames then 3 requests are sent. If you have a single document with 2 includes then 1 request is sent. 3 > 1
Can you think of any example to the contary?

I re-emphasise my previous list.

bluecaterpillar
03-03-2006, 02:26 PM
How about Eischen's, Oklahoma's oldest bar and grill and the world's best fried chicken?

johneva
03-03-2006, 02:29 PM
Sounds good to me.

I'll be right over.

userlogin
03-03-2006, 02:38 PM
Dude, I have a life, stop bashing frames, they are not bad, they like every other technology, has its place and allot of the time that fact is overlooked.

Bottom line is that MOST sites I visit are in some form of frameset.

the tree
03-03-2006, 03:25 PM
Hehe, children are so amusing.