cvs: phpweb / userprefs.js
| From: | Gabor Hojtsy | Date: | Tue, 16 Sep 2003 16:21:37 +0000 |
| Subject: | cvs: phpweb / userprefs.js | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-21029@lists.php.net to get a copy of this message | ||
goba Tue Sep 16 12:21:37 2003 EDT
Modified files:
/phpweb userprefs.js
Log:
Workaround for the 3px IE display bug
Index: phpweb/userprefs.js
diff -u phpweb/userprefs.js:1.7 phpweb/userprefs.js:1.8
--- phpweb/userprefs.js:1.7 Sun Aug 24 07:45:53 2003
+++ phpweb/userprefs.js Tue Sep 16 12:21:37 2003
@@ -2,6 +2,7 @@
function runOnLoad()
{
searchHistory();
+ resizeColumnsIE();
}
// Get a value of one cookie set by it's name
@@ -73,6 +74,23 @@
break;
}
}
+ }
+ }
+}
+
+// This function is a workaround for the IE 3px bug,
+// and therefore is written in IE only JS. If the central
+// column is higher than the left or right sidebar, we need
+// to adjust the height of the sidebars to the contents.
+function resizeColumnsIE()
+{
+ if (document.all && document.all["leftbar"]) {
+ contentH = document.all["content"].offsetHeight;
+ if (contentH > document.all["leftbar"].offsetHeight) {
+ document.all["leftbar"].style.pixelHeight = contentH;
+ }
+ if (document.all["rightbar"] && contentH >
document.all["rightbar"].offsetHeight) {
+ document.all["rightbar"].style.pixelHeight = contentH;
}
}
}