Re: [PHP-DB] Resolution detect and redirect
Does it work when Javascript is turned off in the client browser? Cara Lane - Designs In The Fast Lane wrote: > 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 on the page you need the php include code in. > if( !IsSet($w) ) > die(' type="text/javascript">window.location.replace("http://www.theairwaysite.com > /restest.php?w=" + screen.width)'); > ?> > This goes where the php include need to show on the page: > 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 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Resolution detect and redirect
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 on the page you need the php include code in. window.location.replace("http://www.theairwaysite.com /restest.php?w=" + screen.width)'); ?> This goes where the php include need to show on the page: 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 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] Resolution detect and redirect
> The PHP function "get_browser()" extract many of the client browser > characteristics but not the screen resolution ! > PHP experts tells not to use JavaScript so you have two choices: > 1st. Do not make a good adaptive design, with horizontal > scroll bars or > tile background images, and tell the user this page was made > thinking he or > she must use the resolution you choose at design time or; > 2nd. Take the risk of use JavaScript "window.screen.width" and > "window.location" properties to evaluate and redirect the user to the well > graphic designed pages. > Or why not use percentage widths?? M@ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Resolution detect and redirect
The PHP function "get_browser()" extract many of the client browser characteristics but not the screen resolution ! PHP experts tells not to use JavaScript so you have two choices: 1st. Do not make a good adaptive design, with horizontal scroll bars or tile background images, and tell the user this page was made thinking he or she must use the resolution you choose at design time or; 2nd. Take the risk of use JavaScript "window.screen.width" and "window.location" properties to evaluate and redirect the user to the well graphic designed pages. HTH Jayme. -Mensagem Original- De: Matthew Cothier <[EMAIL PROTECTED]> Para: <[EMAIL PROTECTED]> Enviada em: terça-feira, 27 de fevereiro de 2001 12:42 Assunto: [PHP-DB] Resolution detect and redirect > I am lookign for a piece of code that will detect the resolution of the user > and return a page dependant on that i.e - The table will be adjusted to suit > that. > > Is there a script where I can detect what the resolution is, and also > redirect to a page depending on what resolution they are using? > > Thanks in advance for any help! > _ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] Resolution detect and redirect
BDY.RTF -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] Resolution detect and redirect
> -Original Message- > From: Darryl Friesen [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 27, 2001 12:57 PM > To: db > Subject: Re: [PHP-DB] Resolution detect and redirect > > > >>>Why not just create a table that will resize to any resolution? > >> > >> Because I am using different sized images for the different resolutions > as > >> well as other page thingys. > >> > >> And I need the script for other things too. > >> > >> So can anyone help? > > Is there anyway to convince you this is a very very bad idea? Leave the > choice up to the user. > > Why? Sure, my screen resolution is 1024x768, but I never run the browser > full screen (I'd bet 99% of people don't), so forcing me to view > a page that > only looks good at 1024x768 when my window size is closer to 800x600 just > annoys me (I've seen a few sites like that; left immediatly even > though they > were good sites). > > If I have the choice, I'll pick the one I think is closest to my current > window size. I've seen several sites that do this. Much better. > Although it's not available in PHP, you can use JavaScript to determine the actual usable size of the browser window, which would eliminate the issue mentioned above. > Another reason not to do this is all the extra work in maintaining all the > different versions of pages/images etc. Better to spend the time writing > PHP code. :) > > > - Darryl > > -- > Darryl Friesen, B.Sc., Programmer/Analyst[EMAIL PROTECTED] > Education & Research Technology Services, http://gollum.usask.ca/ > Department of Computing Services, > University of Saskatchewan > -- > "Go not to the Elves for counsel, for they will say both no and yes" > > > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] Resolution detect and redirect
Would be a feat indeed if you could get PHP to do this! It does need Javascript to do (although having returned the result, you could then carry this forward by setting a variable server side (in php!) that identified the user and continued to display appropriate page versions). If you were feeling really clever, you could even go the whole hog and store these as variables using the session functions of PHP4 (would then mean that the variable as well as any others you choose to set for the user don't have to be laboriously carried over each time). Just a thought. Seriously though, definitely worth trying http://www.irt.org I would be very supprised if there wasn't an FAQ specifically about this (its actually very easy to do in Javascript). Have fun, Ben Stoneham Technical Director - FCP Internet LTD ___ FCP Internet LTD - 'Making the Web Work for You' 70 Smithbrook Kilns, Cranleigh, Surrey, GU6 8JJ, UK. Tel. 01483 272 303 Fax. 01483 272 303 mail: [EMAIL PROTECTED] http://www.fcpl.com ___ -Original Message- From: Joe Brown [mailto:[EMAIL PROTECTED]] Sent: 27 February 2001 20:46 To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Resolution detect and redirect This feat will require a java script (not appropriate for php/db). I saw something on a javascript site, perhaps www.webreference.com gl ""Matthew Cothier"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > >Why not just create a table that will resize to any resolution? > > Because I am using different sized images for the different resolutions as > well as other page thingys. > > And I need the script for other things too. > > So can anyone help? > _ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Resolution detect and redirect
>>>Why not just create a table that will resize to any resolution? >> >> Because I am using different sized images for the different resolutions as >> well as other page thingys. >> >> And I need the script for other things too. >> >> So can anyone help? Is there anyway to convince you this is a very very bad idea? Leave the choice up to the user. Why? Sure, my screen resolution is 1024x768, but I never run the browser full screen (I'd bet 99% of people don't), so forcing me to view a page that only looks good at 1024x768 when my window size is closer to 800x600 just annoys me (I've seen a few sites like that; left immediatly even though they were good sites). If I have the choice, I'll pick the one I think is closest to my current window size. I've seen several sites that do this. Much better. Another reason not to do this is all the extra work in maintaining all the different versions of pages/images etc. Better to spend the time writing PHP code. :) - Darryl -- Darryl Friesen, B.Sc., Programmer/Analyst[EMAIL PROTECTED] Education & Research Technology Services, http://gollum.usask.ca/ Department of Computing Services, University of Saskatchewan -- "Go not to the Elves for counsel, for they will say both no and yes" -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Resolution detect and redirect
This feat will require a java script (not appropriate for php/db). I saw something on a javascript site, perhaps www.webreference.com gl ""Matthew Cothier"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > >Why not just create a table that will resize to any resolution? > > Because I am using different sized images for the different resolutions as > well as other page thingys. > > And I need the script for other things too. > > So can anyone help? > _ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] Resolution detect and redirect
>Why not just create a table that will resize to any resolution? Because I am using different sized images for the different resolutions as well as other page thingys. And I need the script for other things too. So can anyone help? _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] Resolution detect and redirect
BDY.RTF -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]