detecting the screen resolution 
Author Message
 detecting the screen resolution

Is there a way to detect the screen resolution of the client?
Ie. if the client is using 1024x768, is there a way to return that
resolution?

Ken Shaw



Mon, 28 Jun 2004 13:01:05 GMT  
 detecting the screen resolution
Here's the script -

<script language="JavaScript">
<!--
        alert("Screen resolution of your monitor is : " + screen.width +
" x " +screen.height);
// -->
</script>

HTH,
- Manish

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Mon, 28 Jun 2004 15:45:55 GMT  
 detecting the screen resolution
Hi Manish,

Your script works on Netscape and IE.
But this following script doesn't work on IE:

<script language="JavaScript">
<!--
 alert("" + window.innerWidth + " " +window.innerheight);
// -->
</script>

Why? Could you help me?
Thanks a lot.

Nicolas.

Quote:
>-----Original Message-----
>Here's the script -

><script language="JavaScript">
><!--
>        alert("Screen resolution of your monitor is : " +
screen.width +
>" x " +screen.height);
>// -->
></script>

>HTH,
>- Manish

>*** Sent via Developersdex http://www.developersdex.com
***
>Don't just participate in USENET...get rewarded for it!
>.



Sun, 11 Jul 2004 03:39:20 GMT  
 detecting the screen resolution
In the current IE DOM, the window object doesn't have a documented
innerwidth or innerheight property. I'm not familiar with that
example, but assuming that you need to get the window resolution, the
method Manish mentioned is probably it.

If you are actually attempting to control the display area inside the
window, you may want to try something like the body.clientHeight or
body.clientWidth properties on IE after implementing logic to test
which browser installed.  Watch the case, Jscript will {*filter*}on
anything else.


Quote:
> Hi Manish,

> Your script works on Netscape and IE.
> But this following script doesn't work on IE:

> <script language="JavaScript">
> <!--
>  alert("" + window.innerWidth + " " +window.innerheight);
> // -->
> </script>

> Why? Could you help me?
> Thanks a lot.

> Nicolas.

> >-----Original Message-----
> >Here's the script -

> ><script language="JavaScript">
> ><!--
> >        alert("Screen resolution of your monitor is : " +
> screen.width +
> >" x " +screen.height);
> >// -->
> ></script>

> >HTH,
> >- Manish

> >*** Sent via Developersdex http://www.*-*-*.com/
> ***
> >Don't just participate in USENET...get rewarded for it!
> >.



Sun, 11 Jul 2004 04:51:10 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. How to detect client screen resolution HELP HELP Urgent

2. How can I detect the screen resolution in VBScript ?

3. detecting screen resolution in VBScript

4. Detecting Screen Resolution

5. Detecting Screen Resolution

6. How do I change Screen Resolutions?

7. resolution of the screen

8. How do I change Screen Resolutions?

9. Screen resolution checking

10. HELP need script to change screen resolution

11. Frameset Row Size dependent on Screen Resolution

12. Setting screen resolution...

 

 
Powered by phpBB® Forum Software