#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    Indiana
    Posts
    3
    Rep Power
    0

    Question DHTML and Java Resizing


    I am currently working on a new website for a local company. The company wants the website to automatically resize according the the viewer's screen resolution. My first thought was java, but I can only figure out how to auto redirect to another premade page. I want something that I do not have to update several versions. I was told that I can do it with DHTML, but I don't have any experience in this area of web design. Can someone please give me some advice on where to start?
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    Netherlands
    Posts
    26
    Rep Power
    0
    You have to use screen.width and screen.height to determine the users screen size
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    Indiana
    Posts
    3
    Rep Power
    0
    but how would that resize my tables? I can understand using screen.width and screen.height in Java, but I can't get it to adjust the size of the page itself.
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    Netherlands
    Posts
    26
    Rep Power
    0
    use this code fro resizing your browser to the maximum
    screen size:

    Code:
    <script language="JavaScript1.2">
    top.window.moveTo(0,0);
    if (document.all) {
       top.window.resizeTo(screen.availWidth,screen.availHeight);
    }
    else if (document.layers||document.getElementById) {
    if(top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
    top.window.outerHeight = screen.availHeight;
    top.window.outerWidth = screen.availWidth;
    }
    }
    </script>
    you maybe have to use things like width="100%" in your tables.
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    Indiana
    Posts
    3
    Rep Power
    0
    Thanks...I'll give it a try and let you know

IMN logo majestic logo threadwatch logo seochat tools logo