Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Screen size

  1. #1
    New to the CF scene
    Join Date
    Mar 2003
    Location
    UK
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Screen size

    hi i am new to java

    i am trying to dectect the screen size of the user and then redirect them depending on results

    i have got the following code but it just says

    missing ")" but i cant see where.

    code is
    -------------------------
    <script>

    var sw=""
    var Sh=""

    function test{
    sw = screen.width
    sh = screen.hight
    document.write(sw)
    }

    </script>
    ______________________________________________

    thanks in advance world
    Bhapy

  • #2
    Senior Coder joh6nn's Avatar
    Join Date
    Jun 2002
    Location
    72 W. 48' 57" , 41 N. 32' 04"
    Posts
    1,887
    Thanks
    0
    Thanked 1 Time in 1 Post
    <script>

    var sw=""
    var Sh=""

    function test{
    sw = screen.width
    sh = screen.height
    document.write(sw)
    }

    </script>
    bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

    i am a loser geek, crazy with an evil streak,
    yes i do believe there is a violent thing inside of me.


  •  

    Posting Permissions

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