48 users online (1 members and 47 guests)  

Thread: JavaScript


  Results 1 to 3 of 3

Related

  1. how to stop javascript via another javascript    Forum: Javascript Forum
    Replies: 0
  2. Replies: 8
  3. Javascript And XML    Forum: Javascript Forum
    Replies: 2
  4. Replies: 5
  5. Javascript / css    Forum: Javascript Forum
    Replies: 1
  1. #1
    YZ250MotoX's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Dec 2001
    Location
    Kent Washington, USA
    Posts
    26

    JavaScript

    I'm pretty sure it's possible to detect what the screen resolution setting is at through javascript, so that you can adjust the settings of a website accordingly, but i don't know how...can anyone help me out ? i think i remember it being something like screenx and screeny or something like that ...any ideas?

  2. #2
    Derek's Avatar
    Be Yourself

    Status
    Offline
    Join Date
    Aug 2001
    Location
    St. George, Utah, USA
    Posts
    466
    I recommend before asking questions you run a search of the forums for what your asking. But anyways, I wrote this code not too many posts ago just for that:

    Code:
    <script language="javascript">
    <!--
    var 800="..\800\index.html";
    var 1024="..\1024\index.html";
    var bigger="..\bigger\index.html";
    
    var screenwidth=screen.width;
    
    if (screenwidth=800) {
    location.href=800;
    }
    if (screenwidth=1024) {
    location.href=1024;
    }
    else {
    location.href=bigger;
    }
    -->
    </script>
    enjoy

  3. #3
    YZ250MotoX's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Dec 2001
    Location
    Kent Washington, USA
    Posts
    26

    thanx

    thanx, and sorry bout that.



Tags for this Thread