469,267 Members | 1,091 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,267 developers. It's quick & easy.

get screen resolution

tim
can someone tell me which function returns the screen resolution in
java script?

Feb 10 '06 #1
7 7790
tim wrote:
can someone tell me which function returns the screen resolution in
java script?


No.

1. This is a FAQ. Search before you post.

2. There is no "java script".

3. You will need an acid for the resolution of your screen, a
JavaScript function does not provide such a feature (yet).
Try some diluted HCl for a start.

4. It is not possible to obtain the display resolution reliably.

5. The property some would suggest would not help you anyway,
because:

Display resolution != desktop size != browser window size
!= viewport size. [psf 3.7]

<URL:http://jibbering.com/faq/>
HTH & HAND

PointedEars
Feb 10 '06 #3
Ivo
<ev*******@gmail.com> schreef
http://javascript.internet.com/user-...n-details.html


That script relies on Java! Not necessary at all. Javascript can do it all
by itslef:

var sw = window.screen.width;
var sh = window.screen.height;
var aw = window.screen.availWidth;
var ah = window.screen.availHeight;

The "available" space is less than the total space when the OS features a
taskbar, as in Windows for example, which is not set to 'auto-hide'. The
height of the taskbar can then be determined by noting the difference:

var taskbarheight = window.screen.height - window.screen.availHeight

When auto-hide is turned on, the reported available space will be the same
as the total, even when the bar is not actually hidden.
--
Ivo
http://www.yorick.onlyfools.com/
Feb 10 '06 #4
JRS: In article <28****************@PointedEars.de>, dated Sat, 11 Feb
2006 00:19:06 remote, seen in news:comp.lang.javascript, Thomas
'PointedEars' Lahn <Po*********@web.de> posted :
tim wrote:
can someone tell me which function returns the screen resolution in
java script?
3. You will need an acid for the resolution of your screen, a
JavaScript function does not provide such a feature (yet).
Try some diluted HCl for a start.


Don't try to make plays on words in a language which you do not know
well enough; it merely exposes the inadequacies of your "education".

--
John Stockton, Surrey, UK. ??*@merlyn.demon.co.uk Turnpike v4.00 MIME.
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Check boilerplate spelling -- error is a public sign of incompetence.
Never fully trust an article from a poster who gives no full real name.
Feb 12 '06 #5
Dr John Stockton wrote:
[...] Thomas 'PointedEars' Lahn [...] posted :
tim wrote:
can someone tell me which function returns the screen resolution in
java script?

3. You will need an acid for the resolution of your screen, a
JavaScript function does not provide such a feature (yet).
Try some diluted HCl for a start.


Don't try to make plays on words in a language which you do not know
well enough; it merely exposes the inadequacies of your "education".


Somehow I expected this. And somehow I knew it would be you.

,-[Cambridge Advanced Learner's Dictionary,
| <URL:http://dictionary.cambridge.org/define.asp?key=67252&dict=CALD>]
|
| *resolution* [...]
| noun [u] SPECIALIZED
| 1 when something separates or is separated into clearly different parts:
| the resolution of oil into bitumen and tar
| 2 the ability of a microscope, or a television or computer screen, to show
| things clearly and with a lot of detail:
| a high/low resolution image
PointedEars
Feb 12 '06 #6
JRS: In article <19*****************@PointedEars.de>, dated Sun, 12 Feb
2006 21:40:26 remote, seen in news:comp.lang.javascript, Thomas
'PointedEars' Lahn <Po*********@web.de> posted :
Dr John Stockton wrote:
[...] Thomas 'PointedEars' Lahn [...] posted :
tim wrote:
can someone tell me which function returns the screen resolution in
java script?
3. You will need an acid for the resolution of your screen, a
JavaScript function does not provide such a feature (yet).
Try some diluted HCl for a start.


Don't try to make plays on words in a language which you do not know
well enough; it merely exposes the inadequacies of your "education".


Somehow I expected this. And somehow I knew it would be you.

,-[Cambridge Advanced Learner's Dictionary,
| <URL:http://dictionary.cambridge.org/define.asp?key=67252&dict=CALD>]
|
| *resolution* [...]
| noun [u] SPECIALIZED
| 1 when something separates or is separated into clearly different parts:
| the resolution of oil into bitumen and tar
| 2 the ability of a microscope, or a television or computer screen, to show
| things clearly and with a lot of detail:
| a high/low resolution image


Dictionaries are the one thing for which one should go not to Cambridge
but to Oxford.

But in this case Cambridge suffices. The normal meanings of
"resolution" do not include "solution" as used in chemistry.

Resolution is, in essence, a separation; solution is in essence an
incorporation.

Rather than using a dictionary written only in what is to you a foreign
language, you should use a suitable English-German dictionary; then you
should be able to understand the explanations. Not a large one; such
also give esoteric meanings unsuitable for ordinary use.

Resolution : Entschlossenheit, Beschluss, Entschluss
Solution : Losung, Auflosung; Erklarhullen

--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Feb 13 '06 #7
Dr John Stockton wrote:
[...] Thomas 'PointedEars' Lahn [...] posted :
Dr John Stockton wrote:
[...] Thomas 'PointedEars' Lahn [...] posted :
tim wrote:
> can someone tell me which function returns the screen resolution in
> java script?
3. You will need an acid for the resolution of your screen, a
JavaScript function does not provide such a feature (yet).
Try some diluted HCl for a start.

Don't try to make plays on words in a language which you do not know
well enough; it merely exposes the inadequacies of your "education".
Somehow I expected this. And somehow I knew it would be you.

,-[Cambridge Advanced Learner's Dictionary,
| <URL:http://dictionary.cambridge.org/define.asp?key=67252&dict=CALD>]
|
| *resolution* [...]
| noun [u] SPECIALIZED
| 1 when something separates or is separated into clearly different parts:
| the resolution of oil into bitumen and tar
| 2 the ability of a microscope, or a television or computer screen, to
| show
| things clearly and with a lot of detail:
| a high/low resolution image


Dictionaries are the one thing for which one should go not to Cambridge
but to Oxford.


,-[Compact Oxford English Dictionary
| <URL:http://www.askoxford.com/concise_oed/resolution?view=uk>]
|
| resolution
|
| • noun 1 a firm decision. 2 an expression of opinion or intention agreed
| on by a legislative body. 3 the quality of being resolute. 4 the |
| resolving of a problem or dispute. 5 the process of reducing or
| separating something into components. 6 the smallest interval measurable
| by a telescope or other scientific instrument. 7 the degree of detail
| visible in a photographic or television image.
But in this case Cambridge suffices. The normal meanings of
"resolution" do not include "solution" as used in chemistry.
That it was meant so is merely your unfounded assumption that allows you to
start a flamewar once more.
Resolution is, in essence, a separation;
Exactly.
solution is in essence an incorporation.

Rather than using a dictionary written only in what is to you a foreign
language, you should use a suitable English-German dictionary; then you
should be able to understand the explanations.


Rather than depending what you call a suitable English-German dictionary for
what is or is not the correct translation for a word to what is to you a
foreign language, you should ask someone who speaks German as native
language. JFYI: The translations your dictionary provided are _not_
sufficient.
PointedEars
Feb 14 '06 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by ZaGras | last post: by
5 posts views Thread by Chris | last post: by
1 post views Thread by fabrice | last post: by
6 posts views Thread by Darian | last post: by
5 posts views Thread by Maxi | last post: by
9 posts views Thread by Steve Wright | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.