views:

44

answers:

2

Hello All,

I've spent a few days with this problem and I can't seem to find a solution anywhere and it's driving me nuts.

I created a web page that loads all of it's content dynamically and for some reason the content gets truncated in IE 7 and 8. It works fine in firefox and opera though.

The content is larger than the size of the window and IE truncates the content so the vertical scrollbar is not enabled. I tried minimizing the window to a smaller size and it seems like IE only renders the content that fits inside the window and all the other content is not created at all since I maximized the window after refreshing and it only shows the portion of the page that fit the smaller window.

If you want to take a look at my problem you can go here, then log in as admin/alalcoalalco and after you are logged in click in the "Administración" link at the menu and reduce the height of your IE browser until half of the table fits the window. Then refresh the page and after maximizing the window you will see that the browser only renders what fits inside the window when it's smaller. If you do the same in opera and firefox it will work perfectly.

Any idea? Anything will be really appreciated.

Thanks!

A: 

I used the validator tool and the document seems to be valid for HTML and CSS. I found an easy way to take a look at the error in the site since I found out that it happens with all the pages, not just the one I told you. Even with pages with static content.

Go to http://www.almaxsoft.com/importec/index.php (this page has static content only) and after you have loaded the page, reduce the height of your IE 7 or 8 browser and then refresh the page. You will see that the explorer window never enables the vertical scrollbar as it only renders the content that fits the window, like in the image bellow:

error1.JPG

After I maximize the window I can see that the content has been truncated and that's the reason the scrollbar is not being enabled, like in the following image:

error2.JPG

As I am a new user I can't post images or more than one link in a single message so I will post the image repository in a new reply for you to check them.

Any ideas? I could really use some help.

Thanks!

Alvos
This is the image repository http://www.almaxsoft.com/images/error1.JPG. Same thing for error2.JPG. Notice the capital letter for JPG. If you don't use capital letter you won't be able to find the images
Alvos
A: 

I think the problem is in your CenterWindow and CloseWindow functions within common.js:

function CenterWindow(controlMain, controlWindow)
{
    var windowWidth = document.documentElement.clientWidth;
    var windowHeight = document.documentElement.clientHeight;
    var popupHeight = controlWindow.height();
    var popupWidth = controlWindow.width();

    controlWindow.css(
        {
            "position": "absolute",
            "top": windowHeight / 2-popupHeight / 2,
            "left": windowWidth / 2-popupWidth / 2
        });

    controlMain.css(
        {
            "height": windowHeight
        });
} 

function CloseWindow(controlMain, controlWindow)
{   
    controlMain.css(
        {
            "opacity": "1"
        });

    controlWindow.fadeOut('fast');
    controlMain.fadeIn('fast');    
}

When the page loads, CenterWindow (via OpenWindow) is called to show the div containing the 'Loading' message. Later on, CloseWindow is called to remove this 'Loading' div. At the end of CenterWindow, you set the height of controlMain (which happens to be the div with id divMain) to the browser window height. However, CloseWindow doesn't restore the height of the divMain div to what it was before the 'Loading' div was opened.

The fix is to add the lines

    controlMain.css(
        {
            "height": ""
        });

to the end of CloseWindow. This removes the temporary height set on divMain.

I can't explain why only IE7/IE8 exhibits this behaviour. However, I was able to reproduce your problem and verify that my suggestion fixes the problem.

Pourquoi Litytestdata
My deep respect and appreciation for you my friend. This actually solved my problem. I eliminated the part of code were I was modifying the height of the main control since I ended up concluding it was pointless. By the way, I just found out that for some reason, modifying the opacity of the main control disabled the vertical scrollbar in IE 7 and 8 so even though the document was being rendered completely I wasn't able to scroll down. I eliminated that part too and only used fade in/ fade out to complete the effect and it worked like a charm.
Alvos
Thank you very much for your help. I really really appreciate you taking the time to dig into this. I really needed a different perspective since I think I got blind with my own code for spending so much time trying to fix this.Again, THANKS! I hope I can have the opportunity to return the favour soon.
Alvos