Hello - I am using the following redirect code (with mods as required for my site) in order to pass the window size value to PHP so I can call up the correct image set for the screen size. Unfortunately due to the server side re-direct the back button on IE no longer functions correctly (it loops back to the redirect). This is of course, unacceptable. If anyone has a solution, I'd love to hear it. Thanks.
Here's the code:
if (isset($GET['width']) AND isset($GET['height'])) {
// output the geometry variables
$resWidth = $GET['width'];
$resWidth = $GET['height'];
if ($resWidth > 800){
$imageSet = "lg"; // use the larger versions of the image set
$tableWidth = 1020;
$styleSheet = "ncafp_lrg_screen_styles.css";
$tdWidth = $tableWidth/5;
$centerCell = 220;
$marginCells = 20;
}
else {
$imageSet = "r";
$tableWidth = 750;
$styleSheet = "ncafp_default_styles.css";
$margin = 5;
$tdWidth = $tableWidth/5; // outer table cell width
$centerCell = 180;
$marginCells = 5;
}
$prePage = $_GET['prePage'];
}
else {
// pass the geometry variables
// (preserve the original query string
// -- post variables will need to handled differently)
echo "<script language='javascript'>\n";
echo " location.href=\"${_SERVER['SCRIPT_NAME']}?${_SERVER['QUERY_STRING']}"
. "&width=\" + screen.width + \"&height=\" + screen.height + \"&prePage=\" + document.referrer;\n";
echo "</script>\n";
exit();
}
$mainCells = ($tableWidth- ($centerCell + ($marginCells*2)))/2; // table width - the 2 5px margins and the 180ps center column equals width od the two main cells in the center table