Much expert advice has been read here on this topic. Though, sometimes this was very general and did not incorporate the suggestion not to use Bootstrap's or Flexbox' solutions to this dilemma.
For all those of you who have a "historic" HTML frameset with several frames I would like to show you the way how I did this transformation from the original PHP code files. Being very grateful for all the professional advice I personally had been able to collect on stack overflow, I would like to return something here.
The basic layout structure is like this:
+---------------------------------------------------------+
| (1) |
+---------------------------------------------------------+
| (2) |
+---------------------------------------------------------+
| (3) | frameBody | (4) |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
+---------------------------------------------------------+
| (5) |
+---------------------------------------------------------+
Legend:
(1) - headerTitle; (2) - frameMenu; (3) - userMenu; (4) - patientMenu; (5) - footerTitle.
After having logged in successfully from login.php, I am being forwarded to site.php which takes over the steering of the entire website. In this file, all the conditions for switching from conditions to conditions and, thus, to corresponding other PHP files is managed.
site.php, however, also takes care of the principal layout of the website, here in the old frameset / frame / noframes way (please excuse the lengthiness of the code example, but I want to show you how nicely short and well-structured an iframe solution can be):
<?php
// Lots of definitions and introductory stuff, not relevant here
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=<?= strtolower($CHARSET) ?>" />
<meta name="author" content="whoever" />
<meta name="date" content="<?= date('r', filectime($_SERVER['SCRIPT_FILENAME'])) ?>" />
<title><?= $sCompanyName ?></title>
</head>
<frameset name="alles" cols="20,*,20" framespacing="0" frameborder="0" border="0" />
<frameset rows="20,50,120,*,40,20" framespacing="0" frameborder="0" border="0" />
<frame name="headerTitle" src="frameHeader.php" scrolling="no" noresize="noresize" />
<frame name="frameMenu" src="frameMenu.php" scrolling="no" noresize="noresize" />
<?php
if (isset($_REQUEST['sBody']) && $_REQUEST['sBody'] == 'login')
echo '<frame name="frameBody" src="login.php' . $sLanguageString . '">';
else {
?>
<frameset name="Frame1" cols="225,1,*,1,225" framespacing="0" frameborder="0" border="0">
<frame name="userMenu" id="userMenu" src="userMenu.php" />
<frame name="frameBody" src="<?= $sBody . (strlen($sURLParameterString) > 1 ? $sURLParameterString : '') ?>" />
<frame name="patientMenu" id="patientMenu" src="patientMenu.php"/>
</frameset>
<frame name="footerTitle" src="frameFooter.php" scrolling="no" noresize="noresize" />
</frameset>
<?php
}
?>
<noframes>
<body>
<?php
setSysMsg($oSysMsg->getExpression('general', 'noFrameSupport', 'This site is based on frames. But your browser doesn\'t support frames.<br />Your should choose another internet browser.'));
echo getLastSysMsg();
?>
</body>
</noframes>
</frameset>
</html>
What are the obstacles now for an easy conversion?
They all refer to my style of working only (apart from other professional skills you can read about in my profile I have developed large documentation and data analysis suites [WAMP, LAMP, MAMP] for handling special types of medical documentation), but if you find yourself in a similar timely condition, this situation may be similar to your own mindset:
Obstacle #1: Ready-made solutions for the implementation of grids such as Bootstrap or Flexbox can be done as well, but using their CSS and JS files often needs a lot of individual adaptation if you want to have sizes, shapes, and colours your way.
Obstacle #2: I personally prefer to experiment in a small, easy to conceive setting before embedding my solution into a bigger structure such as Bootstrap and Flexbox (and possibly others, too).
Obstacle #3: I simply do not have the time to sit in front of the screen for hours and hours to check out some layout stuff when I dearly need to get data analyses and evaluations done.
Thus, after experimenting with WampServer on my localhost, I have found the following solution:
Please mind that, of course, it is a good if not essential step to cast the
style="whatever"statements into an external CSS file, but this is not necessary here to show you what I mean.It is important not to change the
name="something"statements from frames to iframes as they are needed for the referral of, for instance, a menu link referring to the above-mentioned code withframeBody(see there):The
allowfullscreenis just an optional element in case one of these iframes should be made fullscreen using an appropriate javascript code (not supplied here).And, finally, the change of both
<!DOCTYPE ...>and<html ...>corresponds to being able to make use of HTML 5 instead of the older HTML 4 declaration which had to refer to a DTD (Document Type Definition).I hope this bit of code helps in a generic way to root from HTML framesets to HTML iframes on the way to a frameless solution as next possible step.