Frames XHTML

J

Jim S

Is it true that under XHTML frames are once again acceptable?
If so how doe I produce frames which a) have no borders b) have a
replacement for the 'target' function?
 
D

David Dorward

Is it true that under XHTML frames are once again acceptable?

XHTML 1.0 is HTML 4.01 except (a) with a few minor tweaks and (b)
expressed in XML

Like HTML 4.01, it includes frames. They cause just as many problems
there as they do in HTML and should be avoided in most circumstances.

XHTML 1.1 is XHTML 1.0 Strict with Ruby anotation. It has awful
browser support. It doesn't have built in frames.

XFrames is, IIRC, a generic way to do frames in XML. I haven't looked
at it closely, but suspect it has dreadful browser support.
If so how doe I produce frames which a) have no borders

Last time I checked, no browser supported the standard way to do this.
b) have a replacement for the 'target' function?

The target attribute is still there in 1.0, with all of its problems.
 
J

Jim S

XHTML 1.0 is HTML 4.01 except (a) with a few minor tweaks and (b)
expressed in XML

Like HTML 4.01, it includes frames. They cause just as many problems
there as they do in HTML and should be avoided in most circumstances.

XHTML 1.1 is XHTML 1.0 Strict with Ruby anotation. It has awful
browser support. It doesn't have built in frames.

XFrames is, IIRC, a generic way to do frames in XML. I haven't looked
at it closely, but suspect it has dreadful browser support.


Last time I checked, no browser supported the standard way to do this.


The target attribute is still there in 1.0, with all of its problems.

Thanks David.
If you glanced at my site, you will see it is almost entirely pictures. It
works well enough unless you want to print a page.
I have tried to make it all validatable and it is, except for the
border/target problem.
I have even tried replacing the tables and the frames, but either I'm not
really up to it or the people trying to help have assumed too much knowledge
on my part.
I guess I shall just stick with the 'if it works, don't fix it' mantra.
 
J

Jonathan N. Little

Jim said:
Thanks David.
If you glanced at my site, you will see it is almost entirely pictures. It
works well enough unless you want to print a page.
I have tried to make it all validatable and it is, except for the
border/target problem.
I have even tried replacing the tables and the frames, but either I'm not
really up to it or the people trying to help have assumed too much knowledge
on my part.

Your site is just one frame wrapper for your "virtual domain". There are
a plethora of very affordable hosting companies out there with real
domain name + hosting package...not frames required
I guess I shall just stick with the 'if it works, don't fix it' mantra.

Well I would say it ain't broke though

http://validator.w3.org/check?verbose=1&uri=http://www.jimscott.co.uk/
Result for http://www.jimscott.co.uk/ - W3C Markup Validator
 
J

Jim S

Your site is just one frame wrapper for your "virtual domain". There are
a plethora of very affordable hosting companies out there with real
domain name + hosting package...not frames required
You see I already don't understand what you are saying :eek:(
I know I can have the whole site hosted, but I don't understand how that
solves the frames problem when I use the frame to get from a movable
thumbnail strip to final picture without losing the thumbnails or opening a
new window.
Well I would say it ain't broke though

http://validator.w3.org/check?verbose=1&uri=http://www.jimscott.co.uk/
Result for http://www.jimscott.co.uk/ - W3C Markup Validator

Well... yes, but my virtual domain ,as you put it
(www.jimscot.pwp.blueyonder.co.uk), validates o.k. 'cept for the frames
problem.
 
C

cwdjrxyz

Is it true that under XHTML frames are once again acceptable?

Frames have always been legal in xhtml 1.0. The 3 types of html 1.0
are transitional, strict, and frameset which you use if you wish to
use frames. Of course frames are not acceptable to some people, but
this is a personal opinion.

There is only one version of xhtml 1.1 and it does not include a
frameset version. It is as strict as a mother superior in a 1800s
convent. There are provisions for extending xhtml 1.1 for special
applications, and you perhaps could include frames that way, but I
have never seen anyone attempt to do that. The next version of xhtml,
under development for some time, is quite different from xhtml 1.1. It
likely will be some time after release before it will be used much,
because browsers will require extensive revisions to use many parts of
it. The main problem with xhtml now is that Microsoft IE, including
the new IE7, does not support true xhtml when served properly as the
mime type application/xhtml+xml or application/xml. If you check most
so-called xhtml pages, they are being served as text/html, and are
thus just html that could be xhtml if there are no errors and they
were served properly using one of the two mentioned mime types. Recent
Opera and Mozilla family(Firefox, Netscape, Seamonkey, and Mozilla)
browsers can be made to handle properly served xhtml, but they do have
a few "warts" that may require a few work-arounds.
 
J

Jonathan N. Little

Jim said:
You see I already don't understand what you are saying :eek:(
I know I can have the whole site hosted, but I don't understand how that
solves the frames problem when I use the frame to get from a movable
thumbnail strip to final picture without losing the thumbnails or opening a
new window.

I was speaking of your opening page

<frameset rows="100%,*" framespacing="0" border="0" frameborder="0">
<noframes>
<body bgcolor="" text="">
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</noframes>
<frame name="main" src="http://www.jimscot.pwp.blueyonder.co.uk"
scrolling="auto">
Well... yes, but my virtual domain ,as you put it
(www.jimscot.pwp.blueyonder.co.uk), validates o.k. 'cept for the frames
problem.

Well there are ton's of examples of how to do thumbs to full size. PHP
which is very easy. Can make a script that makes a menu of thumbs in a
category folder and links to a script the shows the fill size image...


Here is a quick example, put thumbs in one folder, full size images in
another, keep the names the same and voile! No coding, no frames.


<?php
$thumbfolder="./thumbs";
$imagefolder="./photos";
$thumbs='<div id="thumbIndex">Image Index<ul>';
$me=htmlentities($_SERVER['PHP_SELF']); // prevent XSS insertion

if ($handle = opendir($thumbfolder)) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
$thumbs .= "<li><a href=\"$me?big=$file\"><img
src=\"$thumbfolder/$file\" alt=\"$file\"></a></li>\n";
}
}
closedir($handle);
$thumbs .= "</ul>\n</div>\n";

$big="<p>[No Picture selected]</p>";
if(isset($_GET['big'])){
$biggy=$_GET['big'];
$big="<div><img src=\"$imagefolder/$biggy\" alt=\"$biggy\"></div>";
}

}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta http-equiv="content-language" content="en-us">
<title>Auto Thumbnailer</title>

<style type="text/css">
BODY {
margin: 1em 1em 1em 7em; padding: 0;
color: #000; background-color: #def;
}
#thumbIndex {
position: absolute;
width: 6em; height: 100%; overflow: auto;
left: 0; top: 0;
color: #fff; background-color: #008;
text-align: center;
}
#thumbIndex UL { list-style: none; margin: 0; padding: 0; }
#thumbIndex LI { margin: 0; padding: 0; }

/* adjust for printing */

@media print{
BODY { margin: 1em; }
#thumbIndex {display: none;}
}

</style>

</head>
<body>

<?php echo $thumbs; ?>

<h1>My Images</h1>

<?php echo $big; ?>

</body>
</html>
 
J

Jim S

Jim said:
You see I already don't understand what you are saying :eek:(
I know I can have the whole site hosted, but I don't understand how that
solves the frames problem when I use the frame to get from a movable
thumbnail strip to final picture without losing the thumbnails or opening a
new window.

I was speaking of your opening page

<frameset rows="100%,*" framespacing="0" border="0" frameborder="0">
<noframes>
<body bgcolor="" text="">
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</noframes>
<frame name="main" src="http://www.jimscot.pwp.blueyonder.co.uk"
scrolling="auto">
Well... yes, but my virtual domain ,as you put it
(www.jimscot.pwp.blueyonder.co.uk), validates o.k. 'cept for the frames
problem.

Well there are ton's of examples of how to do thumbs to full size. PHP
which is very easy. Can make a script that makes a menu of thumbs in a
category folder and links to a script the shows the fill size image...

Here is a quick example, put thumbs in one folder, full size images in
another, keep the names the same and voile! No coding, no frames.

<?php
$thumbfolder="./thumbs";
$imagefolder="./photos";
$thumbs='<div id="thumbIndex">Image Index<ul>';
$me=htmlentities($_SERVER['PHP_SELF']); // prevent XSS insertion

if ($handle = opendir($thumbfolder)) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
$thumbs .= "<li><a href=\"$me?big=$file\"><img
src=\"$thumbfolder/$file\" alt=\"$file\"></a></li>\n";
}
}
closedir($handle);
$thumbs .= "</ul>\n</div>\n";

$big="<p>[No Picture selected]</p>";
if(isset($_GET['big'])){
$biggy=$_GET['big'];
$big="<div><img src=\"$imagefolder/$biggy\" alt=\"$biggy\"></div>";
}

}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta http-equiv="content-language" content="en-us">
<title>Auto Thumbnailer</title>

<style type="text/css">
BODY {
margin: 1em 1em 1em 7em; padding: 0;
color: #000; background-color: #def;
}
#thumbIndex {
position: absolute;
width: 6em; height: 100%; overflow: auto;
left: 0; top: 0;
color: #fff; background-color: #008;
text-align: center;
}
#thumbIndex UL { list-style: none; margin: 0; padding: 0; }
#thumbIndex LI { margin: 0; padding: 0; }

/* adjust for printing */

@media print{
BODY { margin: 1em; }
#thumbIndex {display: none;}
}

</style>

</head>
<body>

<?php echo $thumbs; ?>

<h1>My Images</h1>

<?php echo $big; ?>

</body>
</html>

Thanks, but you have lost me already.
I didn't know whether that is one page to create *links* from thumbnails in
a folder called thumbs to a folder called photos OR to 'create' thumbnails
from photos.
You can tell from my site that html and a little css is my limit so far.
Thanks for trying.
 
J

Jonathan N. Little

Thanks, but you have lost me already.
I didn't know whether that is one page to create *links* from thumbnails in
a folder called thumbs to a folder called photos OR to 'create' thumbnails
from photos.
You can tell from my site that html and a little css is my limit so far.
Thanks for trying.

Well you *would* have to do a little research on PHP but it is not too
difficult.

For example a simple deployment would be to create a folder for each
photo category
/boats
/trees
/widets

Then in each category folder create two subfolders "thumbs" & "photos"

For each image in the category create two images with the *same name*,
the full size which you put in the respective "photos" folder and one
reduced in the "thumbs". I would make the thumbnails all the same width,
in my example 50px work will, change the style to adjust.

Then in each category folder create an "index.php" from the cut and
paste code below.


#### START of index.php ####
<?php
$thumbfolder="./thumbs"; //just example change as reqd
$imagefolder="./photos"; //just example change as reqd
$thumbs='<div id="thumbIndex">Image Index<ul>';
$me=htmlentities($_SERVER['PHP_SELF']); // prevent XSS insertion

if ($handle = opendir($thumbfolder)) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
$thumbs .= "<li><a href=\"$me?big=$file\"><img
src=\"$thumbfolder/$file\" alt=\"$file\"></a></li>\n";
}
}
closedir($handle);
$thumbs .= "</ul>\n</div>\n";

$big="<p>[No Picture selected]</p>";
if(isset($_GET['big'])){
$biggy=$_GET['big'];
$big="<div><img src=\"$imagefolder/$biggy\" alt=\"$biggy\"></div>";
}

}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta http-equiv="content-language" content="en-us">
<title>Auto Thumbnailer</title>

<style type="text/css">
BODY {
margin: 1em 1em 1em 7em; padding: 0;
color: #000; background-color: #def;
}
#thumbIndex {
position: absolute;
width: 6em; height: 100%; overflow: auto;
left: 0; top: 0;
color: #fff; background-color: #008;
text-align: center;
}
#thumbIndex UL { list-style: none; margin: 0; padding: 0; }
#thumbIndex LI { margin: 0; padding: 0; }

/* adjust for printing */

@media print{
BODY { margin: 1em; }
#thumbIndex {display: none;}
}

</style>

</head>
<body>
<!-- basically this is just plain html except for 2 PHP inserts -->
<?php
//inserts the thumb index
echo $thumbs;
?>

<h1>My Images</h1>

<?php
//inserts the big photo
echo $big;
?>

<!-- link back to home -->
<p>Go back to <a href="/">Home</a>.</p>

</body>
</html>
#### END START of index.php ####

So the url to see your "boat" photos would be

"http://www.example.com/boats"

or widgets would be

"http://www.example.com/widgets"

to add an image to the category just add the thumbnail and image to the
respective folders and the index.php will automatically add to the index
with no html editing required. The only time you would need to edit a
page is your home page when you add a category.
 

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

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,158
Latest member
Vinay_Kumar Nevatia
Top