Contributions

Features (Category Index)
Search: 

redirect on resolution

This very small code will enable you to detect the clients resolution and act on that accordingly.
Different stylesheets for instance.

Just put it in the application_top.php file

// Resolution redirect
if (!tep_session_is_registered('res')) {
if (isset($HTTP_GET_VARS['res'])) {
$_SESSION['res'] = $HTTP_GET_VARS['res'];
} else {
echo '<SCRIPT>
if (screen.width==800) { location.href="http://www.crystallight.com.tw/index.php?res=800" }
if (screen.width==1024) { location.href="http://www.crystallight.com.tw/index.php?res=1024" }
</SCRIPT>
<noscript>
</noscript>';
echo "n";
}
}

Expand All / Collapse All

redirect on resolution amanda 15 Nov 2004

This very small code will enable you to detect the clients resolution and act on that accordingly.
Different stylesheets for instance.

Just put it in the application_top.php file

// Resolution redirect
if (!tep_session_is_registered('res')) {
if (isset($HTTP_GET_VARS['res'])) {
$_SESSION['res'] = $HTTP_GET_VARS['res'];
} else {
echo '<SCRIPT>
if (screen.width==800) { location.href="http://www.crystallight.com.tw/index.php?res=800" }
if (screen.width==1024) { location.href="http://www.crystallight.com.tw/index.php?res=1024" }
</SCRIPT>
<noscript>
</noscript>';
echo "n";
}
}

Note: Contributions are used at own risk.