Is it possible to reset the screen resolution in Javascript?


N

Norman Swartz

I want to place some graphic images on the web that are optimally viewed at
a resolution of 1024 by 768 pixels. Is it possible, within Javascript,to
force a particular screen resolution?
 
Ad

Advertisements

T

TC

Norman said:
I want to place some graphic images on the web that are optimally viewed at
a resolution of 1024 by 768 pixels. Is it possible, within Javascript,to
force a particular screen resolution?

Let me argue the case for why you should not even -think- of doing
that.

Say you have an image that is larger than the browser window. IE has a
setting where you can choose from one of two behaviours: (a) reduce the
image in size to fit in the window, or (b) display the image in full
size & add scrollbars accordingly.

Some folks prefer option (a). I personally prefer option (b). Can you
imagine how peeved I would be, if some webste (or program) changed my
setting from (b) to (a)? I would simply change it back, and never go to
that website again.

The same apples to other screen related settings such as resolution,
default text size, desktop wallpaper, and so on. These are -personal-
settings, and it is not appropriate for any program or website to
change them, without the user's consent.

In addition, the user might have other, technical reasons for wanting
to use a lower resolution. Perhaps he can't read text at higher
resolutions. Perhaps he constantly uses a program that requires the
lower resolution. Perhaps his favourite game crashes the PC, when it is
run at higher resolutions. What if you change the resolution, and his
favourite game (which happens to be running at that time), instantly
crashes his PC?

Believe me: you do not want to do what you've asked. If you -did-,
then, many people would never visit your site again.

HTH,
TC (MVP MSAccess)
http://tc2.atspace.com
 
M

McKirahan

Norman Swartz said:
I want to place some graphic images on the web that are optimally viewed at
a resolution of 1024 by 768 pixels. Is it possible, within Javascript,to
force a particular screen resolution?

You could probably detect the visitor's current resolution
then refuse to display your page until they changed it. :)
 
R

RobG

Norman said:
I want to place some graphic images on the web that are optimally viewed at
a resolution of 1024 by 768 pixels.

That might be the best setting for you, on your screen, using your
browser, but you don't know the physical characteristics of my screen
or my particular viewing requirements, therefore you can't possibly
know what *I* think is optimal.

Provide advice to the user about the characteristics of the images you
are about to display and let them decide. Do not make statements like
"best viewed at 1024x768", tell them "The following images are 1024x768
pixels in 24bit colour" or whatever. Then let the viewer decide if
they want to see them full-screen (whatever that might be for them) or
at some other setting.

Remember your viewers may be using displays anywhere from say 320x240
to 1600x1200 and beyond, at a variety of aspect ratios (say anywhere
from 4:3 to 16:9 and higher) oriented to either landscape or portrait.
They may want images stretched to the edges or not, or reduced to fit,
or not.

Is it possible, within Javascript,to
force a particular screen resolution?

No, thankfully.
 
D

Dr John Stockton

JRS: In article <[email protected]>, dated Wed,
11 Oct 2006 06:39:59 remote, seen in Norman
Swartz said:
I want to place some graphic images on the web that are optimally viewed at
a resolution of 1024 by 768 pixels. Is it possible, within Javascript,to
force a particular screen resolution?

Other considerations apart, that is a stupid question.

Given that, because you have an image almost as big as 1024*768, so that
it more-or-less fills the available area of a browser used full-screen
on a 1024*768 display, and it looks nice on your 17" 1024*768 screen -

Why do you want to force a user who has a 34" 2048*1536 display to
change mode to 1024*768 and see rather large pixels, when he can
perfectly well see just what you can see in a browser window occupying a
quarter of the screen area?

It's a good idea to read the newsgroup and its FAQ. See below.
 
Ad

Advertisements

J

Jeff North

|
| Norman Swartz wrote:
| > I want to place some graphic images on the web that are optimally viewed at
| > a resolution of 1024 by 768 pixels.
|
| That might be the best setting for you, on your screen, using your
| browser, but you don't know the physical characteristics of my screen
| or my particular viewing requirements, therefore you can't possibly
| know what *I* think is optimal.
|
| Provide advice to the user about the characteristics of the images you
| are about to display and let them decide. Do not make statements like
| "best viewed at 1024x768", tell them "The following images are 1024x768
| pixels in 24bit colour" or whatever. Then let the viewer decide if
| they want to see them full-screen (whatever that might be for them) or
| at some other setting.
|
| Remember your viewers may be using displays anywhere from say 320x240
| to 1600x1200 and beyond, at a variety of aspect ratios (say anywhere
| from 4:3 to 16:9 and higher) oriented to either landscape or portrait.
| They may want images stretched to the edges or not, or reduced to fit,
| or not.

To add to the above:
which of the 3 monitors of mine would you change?
I have 2 video cards running 3 monitors and each monitor is at a
different resolution.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top