Problem with frameset in index.htm

C

Cookie

I have created an frameset in my index.htm I have 3 frames (top, main
and bottom)
In the main frame there's a link to the next page.
On the next page i would like to change my main in 2 frames resp. left
main and right main.
What is the right way to do this? Go to a new index (index2) of.....

Thanx

Cookie
 
R

Roy Schestowitz

__/ [ Cookie ] on Sunday 21 May 2006 12:34 \__
I have created an frameset in my index.htm I have 3 frames (top, main
and bottom)
In the main frame there's a link to the next page.
On the next page i would like to change my main in 2 frames resp. left
main and right main.
What is the right way to do this? Go to a new index (index2) of.....

Thanx

Cookie

Redesign the site before it's too late. You are playing with fire.

http://www.html-faq.com/htmlframes/?framesareevil

Giving you any advice on any particulars (going along with your questions,
that is) will only encourage bad habits and cripple you in the future.

Best wishes,

Roy
 
D

dorayme

I have created an frameset in my index.htm I have 3 frames (top, main
and bottom)
In the main frame there's a link to the next page.
On the next page i would like to change my main in 2 frames resp. left
main and right main.
What is the right way to do this? Go to a new index (index2) of.....

Thanx

Cookie

Redesign the site before it's too late. You are playing with fire.

http://www.html-faq.com/htmlframes/?framesareevil

Giving you any advice on any particulars (going along with your questions,
that is) will only encourage bad habits and cripple you in the future.[/QUOTE]

Sounds a bit dramatic. Have you no respect for preserving a
species? (I know... in this church... it's the html/css soul of
folk that need saving...)

To the OP: I take it that you have 3 frames on the index page
and you want to link to a page that has 2 frames. So link to it
by making it like your index page (except that it will have a
frameset with 2 frames and be called something else, like
"pageTwo.html". (With, so to speak, "the" same 2 of the 3 frames
named in the index page frameset. They will have the same
horizontal dimensions etc as the two on the index page).

Post a url if you want further.

And in your travels, read up on how to minimise the evil that is
inherent in frames. I don't think anyone has written anything on
how to maximize it... mmm... there's a research project...
 
R

Roy Schestowitz

__/ [ dorayme ] on Monday 22 May 2006 00:20 \__
Redesign the site before it's too late. You are playing with fire.

http://www.html-faq.com/htmlframes/?framesareevil

Giving you any advice on any particulars (going along with your questions,
that is) will only encourage bad habits and cripple you in the future.

Sounds a bit dramatic. Have you no respect for preserving a
species? (I know... in this church... it's the html/css soul of
folk that need saving...)[/QUOTE]


I have fallen into the infamous '3-frame trap' when I built 2-3 of my
earliest Web sites. Bad in all respects, SEO included. Too hard to change
because of the amount of work which is involved. I utter owing to personal
pains.

To the OP: I take it that you have 3 frames on the index page
and you want to link to a page that has 2 frames. So link to it
by making it like your index page (except that it will have a
frameset with 2 frames and be called something else, like
"pageTwo.html". (With, so to speak, "the" same 2 of the 3 frames
named in the index page frameset. They will have the same
horizontal dimensions etc as the two on the index page).


To avoid a frame trap (a cyclic frame-within-frame-within frame...), make
sure you use target=_top in your links. This can be illusive.

Post a url if you want further.

And in your travels, read up on how to minimise the evil that is
inherent in frames. I don't think anyone has written anything on
how to maximize it... mmm... there's a research project...


Frame me unimpressed. *smile*

Best wishes,

Roy
 
D

dorayme

Sounds a bit dramatic. Have you no respect for preserving a
species? (I know... in this church... it's the html/css soul of
folk that need saving...)


I have fallen into the infamous '3-frame trap' when I built 2-3 of my
earliest Web sites. Bad in all respects, SEO included. Too hard to change
because of the amount of work which is involved. I utter owing to personal
pains.[/QUOTE]

Yes, fair enough... my experience was a bit different: I had one
fair sized commercial site in frames, just 2 frames, left for nav
and right for content. It developed into quite a palava with a
whole folder of framesets to cope. Eventually, I completely
rewrote it without frames [in spite of Mark Parnell fierce
protestations.. :)]. It was an opportunity for redesigning the
whole thing but I can't honestly say that I work any less hard
trying to update it these days... But yes, there are other
advantages and I am glad to be rid of them. But they are quite
fun! I made a site once to see if I could crash my machine... I
made idiotic sites that had to be in frames to be that idiotic. I
have fond memories...
 
R

Roy Schestowitz

__/ [ dorayme ] on Monday 22 May 2006 08:53 \__
I have fallen into the infamous '3-frame trap' when I built 2-3 of my
earliest Web sites. Bad in all respects, SEO included. Too hard to change
because of the amount of work which is involved. I utter owing to personal
pains.

Yes, fair enough... my experience was a bit different: I had one
fair sized commercial site in frames, just 2 frames, left for nav
and right for content. It developed into quite a palava with a
whole folder of framesets to cope. Eventually, I completely
rewrote it without frames [in spite of Mark Parnell fierce
protestations.. :)]. It was an opportunity for redesigning the
whole thing but I can't honestly say that I work any less hard
trying to update it these days... But yes, there are other
advantages and I am glad to be rid of them. But they are quite
fun! I made a site once to see if I could crash my machine... I
made idiotic sites that had to be in frames to be that idiotic. I
have fond memories...[/QUOTE]

It takes some very buggy Web browser and/or kernel to enable pages to have
such a catastrophic effect, Imagine yourself a site whose address is
reboot.com, which does precisely what it says on the tin (address bar). At
the moment (*glances over to ensure you use a Mac*), there are Web sites
that can be aptly address install-some-stuff-that-will-screw-my-os.com.
These will be worse than a reboot because they don't go away. All you need
to do is use search engines or follow 'untrusted' links...

Best wishes,

Roy
 
D

dorayme

Roy Schestowitz said:
__/ [ dorayme ] on Monday 22 May 2006 08:53 \__
But they are quite
fun! I made a site once to see if I could crash my machine... I
made idiotic sites that had to be in frames to be that idiotic. I
have fond memories...

It takes some very buggy Web browser and/or kernel to enable pages to have
such a catastrophic effect, ...
I think there can be trouble if the memory manager is just so and
memory gets gobbled up by frames that load framesets that have
many frames that in turn have many and so on... OS X on a Mac has
a much more sophisticated way of managing things than pre X. I
know little about PCs.
 
T

Toby Inkster

dorayme said:
I think there can be trouble if the memory manager is just so and
memory gets gobbled up by frames that load framesets that have
many frames that in turn have many and so on...

The following PHP file is fun.

It generates a frameset consisting of two frames (canvas divided
horizontally) and loads into each a frameset consisting of two more
frames (divided vertically), thus splitting the canvas into four
rectangles. The total number of pages loaded now is 3.

Into each of these it loads a frameset splitting the frame horizontally
into three smaller frames (pages loaded: 7), and each of those is further
divided into three smaller frames vertically (pages loaded: 19). Your
canvas should now be divided into 1 x 4 x 9 = 36 rectangles.

Each of these 36 frames is then given a frameset (pages loaded: 55) that
horizontally subdivides it into 4 frames (pages loaded: 199), each of
which is subdivided into four frames vertically. 1 x 4 x 9 x 16 = 576
rectangles.

At this point, an artificial limit comes in and stops recursion from going
any further, but at this point the browser has downloaded close to 800
pages according to my calculations!

<?php

# $limit allows us to limit how far this page recurs.
# To be nasty, set $limit = 0.
$limit = 4;

$nframes = (int)$_GET['nframes'];
if ($nframes < 1)
$nframes = 2;

$ftype='rows';
if ($_GET['ftype']=='cols')
$ftype = 'cols';


if ($limit && $nframes>$limit)
{
# safety feature
print "ARGH!";
exit;
}

# Generate frameset
$n = $nframes;
while ($n>0)
{
$f[]='*';
$n--;
}
$f = implode(',', $f);
$frameset = sprintf('%s="%s"', $ftype, $f);

# Generate URL to load in each frame
$new_ftype = 'cols';
$new_nframes = $nframes;
if ($ftype=='cols')
{
$new_ftype = 'rows';
$new_nframes = $nframes + 1;
}
$url = sprintf('%s?nframes=%s&ftype=%s'
,$_SERVER['REQUEST_URI']
,$new_nframes
,$new_ftype
);


?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>Nasty Frames</title>
</head>
<frameset <?= $frameset ?>>
<?php
for ($i=0; $i<$nframes; $i++)
printf("<frame src=\"%s\">", htmlentities($url));
?>
</frameset>
</html>
 
D

dorayme

Toby Inkster said:
The following PHP file is fun.

It generates a frameset consisting of two frames (canvas divided
horizontally) and loads into each a frameset consisting of two more...

Yes, clever - or sensible - way of doing this. Sort of nuclear
grenade test for browsers. <g>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,233
Latest member
AlyssaCrai

Latest Threads

Top