Is it possible to reset the screen resolution in Javascript?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Norman Swartz

    Is it possible to reset the screen resolution in Javascript?

    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?
  • TC

    #2
    Re: Is it possible to reset the screen resolution in Javascript?


    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. 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)


    Comment

    • Ivan Marsh

      #3
      Re: Is it possible to reset the screen resolution in Javascript?

      On Wed, 11 Oct 2006 00:11:48 -0700, TC wrote:
      >
      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. 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.
      Let me do the same thing faster: My machine does not belong to you!

      Comment

      • McKirahan

        #4
        Re: Is it possible to reset the screen resolution in Javascript?

        "Norman Swartz" <swartz@sfu.caw rote in message
        news:Xns9858F0D 3E218Aswartzsfu ca@64.59.144.76 ...
        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. :)


        Comment

        • Jim Land

          #5
          Re: Is it possible to reset the screen resolution in Javascript?

          Norman Swartz <swartz@sfu.caw rote in
          news:Xns9858F0D 3E218Aswartzsfu ca@64.59.144.76 :
          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?
          Detect the current resolution.
          If it isn't what you want, put up an alert:
          alert("This page best viewed with a screen resolution of 1024 x 768");
          and let the viewer decide to change it (or not).

          Comment

          • RobG

            #6
            Re: Is it possible to reset the screen resolution in Javascript?


            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.

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


            --
            Rob

            Comment

            • Dr John Stockton

              #7
              Re: Is it possible to reset the screen resolution in Javascript?

              JRS: In article <Xns9858F0D3E21 8Aswartzsfuca@6 4.59.144.76>, dated Wed,
              11 Oct 2006 06:39:59 remote, seen in news:comp.lang. javascript, Norman
              Swartz <swartz@sfu.cap osted :
              >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.
              --
              © John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 IE 4 ©
              <URL:http://www.jibbering.c om/faq/>? JL/RC: FAQ of news:comp.lang. javascript
              <URL:http://www.merlyn.demo n.co.uk/js-index.htmjscr maths, dates, sources.
              <URL:http://www.merlyn.demo n.co.uk/TP/BP/Delphi/jscr/&c, FAQ items, links.

              Comment

              • Jeff North

                #8
                Re: Is it possible to reset the screen resolution in Javascript?

                On 11 Oct 2006 17:51:46 -0700, in comp.lang.javas cript "RobG"
                <rgqld@iinet.ne t.au>
                <1160614306.735 515.22100@k70g2 000cwa.googlegr oups.comwrote:
                >|
                >| 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.
                >| Is it possible, within Javascript,to
                >| force a particular screen resolution?
                >|
                >| No, thankfully.
                ---------------------------------------------------------------
                jnorthau@yourpa ntsyahoo.com.au : Remove your pants to reply
                ---------------------------------------------------------------

                Comment

                Working...