You are here: Re: resolution « All PHP « IT news, forums, messages
Re: resolution

Posted by v_verno on 12/28/06 06:45

On Thu, 28 Dec 2006 02:45:32 -0000, "toffee" <toffee@toffee.com>
wrote:

>just a quick question - is it possible to use php to find out the current
>screen resolution ?
don't think so because php is server side and you need something on
the client.

>if not maybe somehow make js talk to php ?
this can be done. The following creates a variable R2Siz in the form
FormL that contains the size of the frame R2. Maybe this is not
exactly what you need but it is a good start. Note : not sure that it
works with all the browser because when i write something i need to be
only IE compatible.

regards

function SetPLeft()
{
document.FormL.R2Siz.value = FrameSize();
document.FormL.submit();
}

function FrameSize()
{
if (document.all)
{
screenW = parent.R2.document.body.offsetWidth;
screenH = parent.R2.document.body.offsetHeight;
}
else
{
screenW = parent.R2.innerWidth;
screenH = parent.R2.innerHeight;
}
return (screenW + 'x' + screenH);
}

 

Navigation:

[Reply to this 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

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