Re: Resolution detect and redirect

From: Date: Thu, 09 Aug 2001 15:41:08 +0000
Subject: Re: Resolution detect and redirect
Groups: php.db 
Request: Send a blank email to php-db+get-11193@lists.php.net to get a copy of this message
I have noticed many posting about this topic and the overall answer seems to be it can't be done. Well, it can! I actually finally got it to work. It is actually quite simple. I think I was trying to make it too hard. FYI, here is the code in case anyone else has this problem: This goes above <HEAD> on the page you need the php include code in. <?php if( !IsSet($w) ) die('<html><head><script language="JavaScript" type="text/javascript">window.location.replace("http://www.theairwaysite.com /restest.php?w=" + screen.width)</script></head></html>'); ?> This goes where the php include need to show on the page: <?php echo include('header'.$w.'.htm'); ?> Then you just have to name your headers for the resolution, ie header800.htm, header1024.htm, etc... Works like a dream! It chooses a header based on the screen resolution of the user and includes it in the proper place for the php include. Cara Lane 214-868-9348 www.designsinthefastlane.com www.dallasbarterexchange.com

« previous php.db (#11193) next »