#1
  1. No Profile Picture
    ads
    Guest
    Devshed Newbie (0 - 499 posts)
    Is there any way to get resolution of clien'ts monitor through Javascript? I mean when user access site home page, through some mechanison javascript will send client's present screen resolution to server.
    So that at server, programme will change .htm/.html file to suit client's screen resolution.


    [This message has been edited by ads (edited May 04, 2000).]
  2. #2
  3. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    Perth West Australia
    Posts
    757
    Rep Power
    15
    The browser sniffing is a bit dodgy - but it works , note only looking for 4+ browsers here less than that or AOL end up at the nobrowser page. Call it from your onload on your index page.


    function fourplus() {
    browser = (((navigator.appName == "Netscape") &&
    (parseInt(navigator.appVersion) >= 4 )) | |
    ((navigator.appName == "Microsoft Internet Explorer") &&
    (parseInt(navigator.appVersion) >= 4 )))
    lessthanseven=(window.screen.width <=700)
    morethanseven=(window.screen.width >=700)
    bigbugger=(window.screen.width >= 900)

    if (browser && bigbugger) {
    window.location = "/1024/index.html}
    else

    if (browser && lessthanseven) {
    window.location = "/640/index.html";
    }
    else
    if (browser && morethanseven) {
    window.location = "/800/index.html";
    }
    else
    window.location="nobrowser.html";
    //(where AOL users end up)
    }

    Regards
    Simon.


    ------------------
    Simon Wheeler
    FirePages -DHTML/PHP/MySQL

Similar Threads

  1. Full screen video in a full screen site
    By SuperFlu in forum HTML Programming
    Replies: 1
    Last Post: February 20th, 2002, 06:37 PM
  2. Replies: 20
    Last Post: January 29th, 2002, 03:52 PM
  3. page layout and screen resolution
    By gaouzief in forum HTML Programming
    Replies: 1
    Last Post: April 27th, 2001, 10:10 AM
  4. getting screen resolution...anyone??
    By mikemm in forum PHP Development
    Replies: 8
    Last Post: April 12th, 2001, 10:32 AM
  5. Screen Resolution
    By nerd2 in forum HTML Programming
    Replies: 2
    Last Post: July 26th, 2000, 06:52 AM

IMN logo majestic logo threadwatch logo seochat tools logo