Results 1 to 4 of 4

Thread: Getting Resolution of User

  1. #1

    Thread Starter
    Addicted Member TheGoldenShogun's Avatar
    Join Date
    Mar 2001
    Location
    VA/MD... anywhere around the beltway
    Posts
    236

    Cool Getting Resolution of User

    I know there's a function out there, I remember using it before but I can't remember right now what it is.

    The function that gets the resolution of your user (800x600) and returns it to you. Anybody know it?


  2. #2
    scoutt
    Guest
    Code:
    <BODY>
    
    <CENTER>
    <SCRIPT LANGUAGE="JavaScript">
    
    <!-- This script and many more are available free online at -->
    <!-- The JavaScript Source!! http://javascript.internet.com -->
    
    <!-- Begin
    var screen_width = null;
    var screen_height = null;
    var resolution = null;
    if (navigator.javaEnabled()) {
    var toolkit = java.awt.Toolkit.getDefaultToolkit();
    var screen_size = toolkit.getScreenSize();
    screen_width = screen_size.width;
    screen_height = screen_size.height;
    resolution = toolkit.getScreenResolution();
    }
    // End -->
    </SCRIPT>
    
    <SCRIPT LANGUAGE="JavaScript">
    <!-- Begin
    if ((screen_width != null)
    && (screen_height != null)
    && (resolution != null)) {
    document.write('<center><h1>Monitor Details:</h1><br><hr><br>');
    document.write('Screen Width:  '+screen_width+'<BR>');
    document.write('Screen Height:  '+screen_height+'<BR>');
    document.write('Screen Resolution: '+resolution+'<BR>');
    document.write('</center>');
    }
    else {
    document.write('<center><P>');
    document.write('I am sorry but we could not determine<P>');
    document.write('the details of this screen.  You might<P>');
    document.write('not have Java enabled in this browser.<P>');
    document.write('</center>');
    }
    // End -->
    </SCRIPT>
    </CENTER>

  3. #3

    Thread Starter
    Addicted Member TheGoldenShogun's Avatar
    Join Date
    Mar 2001
    Location
    VA/MD... anywhere around the beltway
    Posts
    236
    hey thanks a lot

  4. #4
    scoutt
    Guest
    hey, no problem, glad to help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width