Files
archived-web-pres2/getwidth.php
Derick Rethans 26b4e55785 - XHTML fixes (that was need to make Firefox work with my new CSS correctly).
- Fixed some call-time-pass-by-reference warnings.
- Allow a new tag "div" , on which effect=slide works as well.
- Changed how body tags are added, so that we can pick a CSS class for the
  body tag dependent on the template.
- Changed some of the ways on how slide XML is opened, related to incomplete
  PHP 6 implementations of functions.

#- Rasmus, I tested those changes with a few of your talks as well, they look
#  fine here, but you might want to double check.
2007-05-03 11:28:39 +00:00

27 lines
858 B
PHP

<?php /*
A bit of fancy footwork to get the browser's inside dimensions in
pixels. Should work on both NS4+ and IE4+. If it doesn't we default
it to something sane. The dimensions are returned to the server via
a Javascript cookie so as to not muck up our nice clean URL. The
function is called if we don't have the dimensions already, or on a
resize event to fetch the new window dimensions.
*/?>
<script type="text/javascript" language="JavaScript" defer="defer">
<!--
function get_dims() {
var winW = 1024;
var winH = 650;
if (window.innerWidth) {
winW = window.innerWidth;
winH = window.innerHeight;
} else if (document.all) {
winW = document.body.clientWidth;
winH = document.body.clientHeight;
}
document.cookie="dims="+winW+"_"+winH;
location.reload(false);
}
//-->
</script>