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
  1. #1
    New Coder
    Join Date
    Jun 2002
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation resolution reading ...

    My site is best viewed at 1024*768 resolution.

    At the opening page there is an alert that says "Site best viewed at 1024*768 resolution", then a 6 second timeout, and finally redirects to main page.

    How can I first get their screen-resolution, then either redirect if it is 1024*768, skipping the alert; but if its not then alert and redirect?

  • #2
    New Coder
    Join Date
    Jul 2002
    Location
    Portugal
    Posts
    44
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <script>
    if(screen.width == 1024)
    {
    window.location='b.htm'
    }
    else
    {
    setTimeout('window.location = "b.htm"',6000)
    alert('best viewed')
    }
    </script>

    something like this


  •  

    Posting Permissions

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