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 8 of 8
  1. #1
    New to the CF scene
    Join Date
    Jun 2003
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy please i want script

    hi

    can any one help me please
    there is any java script detect my display setting and use it to
    for example
    check if my display is 800 by 600 pix it will open the page which contains 800 by 600 properties
    or if my display is 1024 by 768 pix it will open the page which contains 1024 by 768 properties


    {
    this is the algorithem which i want to find a java script for it

    get screen(w,h)

    if (w=800) && (h=600)
    open(index_800_600.htm)
    else if (w=1024) && (h=768)
    open(index_1024_768.htm)
    }




    thanx alot

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Posts
    626
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If you had searched the Free Scripts Section you would have found this script:
    http://www.javascriptkit.com/script/cut162.shtml

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    Nashua, NH
    Posts
    1,724
    Thanks
    0
    Thanked 0 Times in 0 Posts
    And what happens on my display which is 1600x1200
    Vladdy | KL
    "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"

  • #4
    New to the CF scene
    Join Date
    Jun 2003
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanx alot Mr requestcode
    thank you my frind

    for Mr Vladdy
    for your display which is 1600x1200 i think you will put third choise which is for this 1600x1200 pix
    Last edited by e3saaar; 06-04-2003 at 12:15 AM.

  • #5
    Registered User
    Join Date
    Apr 2003
    Location
    Murmansk, Arctic
    Posts
    84
    Thanks
    0
    Thanked 0 Times in 0 Posts
    e3saaar, why are your scrollbars on the right side of your pages?

    Wouldn't this be better for your viewers/language?:

    <html dir="rtl">



    And you could remove this part:
    <p align="right">


  • #6
    Senior Coder
    Join Date
    Jun 2002
    Location
    Nashua, NH
    Posts
    1,724
    Thanks
    0
    Thanked 0 Times in 0 Posts
    What about those who use screen readers ad do not have any resolution at all???
    You are missing a point: you can not predict all the possible ways (and resolutions) which may be used to access a web page. Your design should be such that it can be accessed and understood regardless of screen resolution.
    Vladdy | KL
    "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"

  • #7
    Registered User
    Join Date
    Apr 2003
    Location
    Murmansk, Arctic
    Posts
    84
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I don't think there's a screen reader for the language on e3saaar's site!

  • #8
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    Use one of the following:

    screen.availHeight - the height of the screen in pixels minus any GUI stuff such as the windows taskbar

    screen.availWidth - the width of the screen in pixels minus any GUI stuff such as the windows taskbar

    screen.height - the height of the screen in pixels
    screen.width - the width of the screen in pixels

    Using screen.availHeight or screen.availWidth is better, as it does not matter which resolution is.

    But you must test it on your own to find out the difference in pixels, because some GUI use large, other use small icons or text in browsers upper taskbar. I use something like that in http://www.ipso.ro/renault_vi/index.html to extend vertically the iframe on the whole available Height of the browser (I worked for the maximum height of the browser upper taskbar, with large icons and text labels.)
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


  •  

    Posting Permissions

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