Reply to Re: hwo to get browser window size?

Your name:

Reply:


Posted by Scott on 04/04/06 12:12

On Tue, 2006-04-04 at 01:28 -0700, webramz@gmail.com wrote:
> You can do this by JavaScript not PHP (or both of them together for
> some reason):
>
> <script language="JavaScript>
> var w = screen.width;
> var h = screen.height;
>
> alert('You are using ' + w + 'x' + h + ' resolution...!');
>
> </script>
>
> Behzad Nategh
>

You could then send that info to PHP by adding:

document.location.href = 'http://www.currentpage.com?w='+w+'&h='+h;

Then use $_GET['w'] and $_GET['h'] for your resolution.

Of course, this method assumes the user has javascript enabled on their
browser.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация