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

    Question AJAX not sizing windows correctly on load

    Hey,

    I am a coding amateur and have a 5 page site loading external pages with ajax into dMiddle. When the page loads the css is not working and my footer is overlapping the content of dMiddle. Once I click a link it resizes to the correct size. I have my pageholder set to auto height and values for other divs but I assume it's the javascipt function causing the problem. Here is the code:

    function fnReset(){ //this fnReset() call is found in the simpleAjax.js
    document.getElementById('dTorso').style.height="auto";
    document.getElementById('dLeft').style.height="auto";
    document.getElementById('dMiddle').style.height="auto";
    document.getElementById('dRight').style.height="auto";
    var disMaxHt=Math.max(parseInt(document.getElementById('dTorso').scrollHeight),parseInt(document.getElem entById('dLeft').scrollHeight),parseInt(document.getElementById('dMiddle').scrollHeight),parseInt(do cument.getElementById('dRight').scrollHeight));
    document.getElementById('dTorso').style.height=disMaxHt + "px";
    document.getElementById('dLeft').style.height="100%";
    document.getElementById('dMiddle').style.height="100%";
    document.getElementById('dRight').style.height="100%";
    }

    any suggestions would be greatly appreciated!

  • #2
    Regular Coder
    Join Date
    Jun 2008
    Posts
    102
    Thanks
    6
    Thanked 9 Times in 9 Posts
    i don't see what the problem is. The first 4 statements aren't necessary also.

  • #3
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,852
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    A link to your page would be useful to see the problems.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

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