to whittle it down as much as I can. The problem is that
Netscape 6.1 on my Win 2K Pro machine is disappearing
the final row of the table.
Opera 7.01 and IE 5 and 5.5 are both OK with the page, and
the offending line is right before the commented out alert line,
but I have been unable to figure why it's happening.
Thanks,
Csaba Gabor from New York
PS. While I am happy to have suggestions on ways to
improve the page (which I will eventually broach separately),
I am primarily intersted in understanding what is going on.
For those who are interested in making suggestions,
The intent of the page is to have the visible area of the
SCREEN filled with a TEXTAREA (to the extent possible)
while accomodating 5 uniformly sized buttons (each with
underlined accessKey. My code will do the uniform sizing)
to its right, with a line below the table and a few above. There
will be more stuff on the page below this, but I want the user
(me) to be able to see the entire TEXTAREA element
without scrolling.
This sounds pretty straightforward, but I've had lots of
problems getting agreement between Opera / IE / Netscape,
which is why you may see lamentable constructions like 4.5in.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD>
<META http-equiv="content-type" content="text/html;charset=iso-8859-1">
<TITLE>Netscape demo</TITLE>
<STYLE type="text/css">
<!--
table#mytab td, table#mytab th {
border: 1px solid #000000; font-size: 75%; vertical-align:top;}
-->
</STYLE>
<SCRIPT type="text/javascript">
function uniformWidths(aButtons) {
// aButtons is either an array of buttons or a list of them.
// Makes them all the width of the widest one
var butt, i, myDiv, max = 0;
if (arguments.length>1) {
aButtons = [aButtons];
for (i=1;i<arguments.length;i++) aButtons[i] = arguments[i]; }
for (butt in aButtons)
if (aButtons[butt] && aButtons[butt].offsetWidth > max)
max = aButtons[butt].offsetWidth;
for (butt in aButtons) {
myDiv = aButtons[butt].getElementsByTagName("DIV")[0]
myDiv.style.width = max;
//alert(max + "\r\n" + aButtons[butt].innerHTML);
aButtons[butt].style.posWidth = max;
}
}
function allButtonsUniform (frm) {
var elem, aButts = [];
for (var i=0;i<frm.elements.length;i++) {
elem = frm.elements[i];
if (elem.type=="button") aButts[aButts.length] = elem; }
if (aButts.length>1) uniformWidths(aButts);
}
</SCRIPT>
</HEAD>
<BODY style="height:100%;padding:0;margin:0;border:solid 1px red"
onLoad='allButtonsUniform(document.forms[0])'>
<DIV style="height:95%;margin-left:.2in;border:solid 1px blue">
<BR><CENTER>Title goes here</CENTER><BR>
<FORM method=post action='index.php' name='Up'>
<TABLE id=mytab style='width:98%;border:solid 1px green'>
<TR>
<TD>Placeholder</td>
<TD align=right>Authorization:</TD>
<TD style='width:4%'><INPUT type=password size=24 name=jelszo></TD>
</TR><TR>
<TD rowspan=2 colspan=2><TEXTAREA
rows=36 cols=10 name=code style='width:100%'></TEXTAREA></TD>
<TD><BUTTON type=button><DIV>PHP / Script</DIV></BUTTON></TD>
</TR><TR>
<TD style='height:4.5in'><BUTTON type=button><DIV
Upload</DIV></BUTTON></TD>
</TR><TR>
<TD>This is</TD>
<TD>the last</TD>
<TD>row</TD>
</TR>
</TABLE>
</FORM></DIV></BODY></HTML>