473,395 Members | 1,641 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Screen Res Question

Guys

Is there a way to capture via an environment variable the users screen res

Steve

Oct 23 '07 #1
8 1373
On Oct 23, 10:46 am, "Steve Ray" <nocha...@all.comwrote:
Guys

Is there a way to capture via an environment variable the users screen res

Steve
PHP runs on the server -- so the answer is no.

Try Javascript.

Oct 23 '07 #2
..oO(ZeldorBlat)
>On Oct 23, 10:46 am, "Steve Ray" <nocha...@all.comwrote:
>>
Is there a way to capture via an environment variable the users screen res
PHP runs on the server -- so the answer is no.

Try Javascript.
And then the question is - why?

Micha
Oct 23 '07 #3
Not in PHP (it runs on the server), but you can with Javascript.

See: http://www.pageresource.com/jscript/jscreen.htm

Charles...

"Steve Ray" <no******@all.comwrote in message
news:ff**********@north.jnrs.ja.net...
Guys

Is there a way to capture via an environment variable the users screen res

Steve

Oct 23 '07 #4
..oO(Sanders Kaufman)
>"Michael Fesser" <ne*****@gmx.dewrote in message
news:jj********************************@4ax.com.. .
>And then the question is - why?

The response pre-answers your question - because PHP runs on the server.
My "Why" was meant as a response to "capture ... the users screen res".

Micha
Oct 23 '07 #5
On Tue, 23 Oct 2007 15:46:23 +0100, in comp.lang.php "Steve Ray"
<no******@all.com>
<ff**********@north.jnrs.ja.netwrote:
>| Guys
|
| Is there a way to capture via an environment variable the users screen res
|
| Steve
PHP knows nothing about the browser so you would need to use
Javascript to query the browsers viewport dimensions.

That being said, I may have a screen with its resolution set to
2048x1536 but the browser is resized to 500x300. How are you going to
handle that situation?

Do a google on html + fluid design
-- -------------------------------------------------------------
jn******@yourpantsyahoo.com.au : Remove your pants to reply
-- -------------------------------------------------------------
Oct 24 '07 #6
"Michael Fesser" <ne*****@gmx.dewrote in message
news:0a********************************@4ax.com...
.oO(Sanders Kaufman)
>>"Michael Fesser" <ne*****@gmx.dewrote in message
news:jj********************************@4ax.com. ..
>>And then the question is - why?

The response pre-answers your question - because PHP runs on the server.

My "Why" was meant as a response to "capture ... the users screen res".
Wow, you gotta know this one.
In one old app, I checked that setting because I knew some OLD people who
use 640x480 would be on the site.
In the current one, I'm checking it to see if they're coming at me with a
PDA or Cell Phone.
(I totally gave up on just using the server user agent.)
Oct 24 '07 #7
..oO(Sanders Kaufman)
>"Michael Fesser" <ne*****@gmx.dewrote in message
news:0a********************************@4ax.com.. .
>>
My "Why" was meant as a response to "capture ... the users screen res".

Wow, you gotta know this one.
In one old app, I checked that setting because I knew some OLD people who
use 640x480 would be on the site.
What does the screen res tell you about the size of the browser window
and its viewport? Exactly nothing.
>In the current one, I'm checking it to see if they're coming at me with a
PDA or Cell Phone.
(I totally gave up on just using the server user agent.)
I don't do any sniffing at all. I write flexible HTML and if I want to
improve the appearance on PDAs (until now it wasn't really necessary),
I could add another stylesheet with media type 'handheld'. For older PDA
browsers I could also add a simple stylesheet switcher just in case they
don't support that media type.

There's almost always a better way than browser or screen res sniffing.

Micha
Oct 25 '07 #8
"Michael Fesser" <ne*****@gmx.dewrote in message
news:5a********************************@4ax.com...
.oO(Sanders Kaufman)
>>In one old app, I checked that setting because I knew some OLD people who
use 640x480 would be on the site.

What does the screen res tell you about the size of the browser window
and its viewport? Exactly nothing.
(You're really in tantrum mode today, aintcha?)

For one thing - it tells you that the viewable browser window maxes out at
640x480.
I don't do any sniffing at all. I write flexible HTML and if I want to
improve the appearance on PDAs (until now it wasn't really necessary),
Wow - HTML that looks as good on a big-screen tv as it does on a cell-phone.
You should patent that process.
Oct 25 '07 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: Dave | last post by:
Hi, I have done some research, trying to Clear The Screen in java code. The first option was the obv: system.out.print("\n\n\n\n\n\n\n\n\n\n\n\n"); then i heard about this method:...
8
by: Els | last post by:
Hi, i have the following script in the head of my document: <script language="Javascript"> <!-- // *********************************************** // AUTHOR: WWW.CGISCRIPT.NET, LLC // URL:...
8
by: gregory_may | last post by:
Is there a way to grab a "Screen Shot" that includes "Tool Tips"? I saw this code someplace, cant remember where. But it doesnt grab "Tool Tips". Is there a better way to do this in .net?...
6
by: Tony Liu | last post by:
Hi, when switched to the full screen mode in VS.NET IDE, is there any way to hide the main menu bar? Thanks Tony
7
by: alr288 | last post by:
Hello All, I recognize that this question has already brought about some debate so I am going to ask as a specific question as I can. I am currently try to create a cross platfrom screen parser...
5
by: TD | last post by:
This question is off topic but you folks have the answers. I do Access development work at clients offices using my laptop. I want to purchase a new laptop but I am wondering if I need a laptop...
10
by: Kenneth Lantrip | last post by:
My question is: Is there a generally accepted way to clear the screen and perhaps move the cursor to a new location (other than newline) for the next printf in standard c? What about ANSI...
31
by: melinama | last post by:
Hello, I've looked through alt.html and this group for an answer to my question. However, I found only cranky arguments with, occasionally, bits of hard-to-understand code - out of context -...
4
by: Annalyzer | last post by:
Not sure if this is the right place to post this question because it is not specific to html or css and it's more of an opinion question than a technical one so feel free to move it if there is a...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.