views:

22

answers:

1

Any idea why this would have an effect? Sorry I can't give the other code as it is private and non shareable :( Any tips would be appreciated.

<body onresize="resizeWindow()" onload="resizeWindow()">
 Content deedeedum.AJAX function to get data and display every 2sec.
 </body>  


    <script type="javascript/text>   
    /**** Page Rescaling Function ****/

    function resizeWindow() 
    {
        var windowHeight = getWindowHeight();

        document.getElementById("content").style.height = (windowHeight - 0) + "px";
        document.getElementById("navigation").style.height = (windowHeight - 0) + "px";

    }

    function getWindowHeight() 
    {
        var windowHeight=0;
        if (typeof(window.innerHeight)=='number') 
        {
            windowHeight = window.innerHeight;
        }
        else {
            if (document.documentElement && document.documentElement.clientHeight) 
            {
                windowHeight = document.documentElement.clientHeight;
            }
            else 
            {
                if (document.body && document.body.clientHeight) 
                {
                    windowHeight = document.body.clientHeight;
                }
            }
        }
        return windowHeight;
    }
   </script>
+1  A: 

There are no Ajax calls in your quoted code, which kind of makes it difficult to help you figure out what's wrong.

One thought: JavaScript on web browsers is single-threaded. That means that if a function is actively running, no other JavaScript code in that window is actively running. Perhaps that has something to do with what you're seeing.

Barring that, create a separate, self-contained, minimalist example of the problem. The odds are very high that in the process of doing that, you'll figure out what's wrong; and if you don't, you have something you can share with others to help you figure out what's wrong.

T.J. Crowder
Am actually working on that now. But I think your answer may have helped me enough.It is just now how to solve the problem to get both parts going...
Thqr