IE6: window.onresize works on IIS, explodes on asp.net Dev Server

Update 1:
Unable to reproduce this on an employee's computer (same setup as mine), so I'm guessing this is a problem with my workstation and not a general one.

I would appreciate it if someone closes this question as I don't have enough reputation to do it myself.

@MatthewMartin. Thanks for your comments :-)


Update 2:
Unlike my colleague, my machine has VS90sp1-KB945140-ENU.exe ( SP1) and VS90SP1-KB957912-x86.exe installed (JS Intellisense fix). It looks like this is the only difference between our settings. I removed both of them, but that didn't solve my problem.


My asp.net (C #) page has some Javascript to resize the object when the user resizes the window.

When I visit the page using IE6 on my DEV server (IIS) it works .
When I access the page using IE6 through VS2008 using F5 or CTRL-F5 (both of which start the ASP.NET development server) it crashes . This seems to go into an infinite resize loop where the adjSpreadsheetSize

function fires the window.resize event, which triggers adjSpreadsheetSize

... Repeat ad infinitum

I see quite a few people complaining that IE6 can't handle events of the same size correctly, but nobody seems to be running into this particular problem.

Any idea why this code works on IIS but not ASP.NET Development Server?

Here's the relevant piece of code:

[snip]
<head>
[snip]
<script language="javascript" type="text/javascript">
    window.onresize = adjSpreadsheetSize;
    window.onload = pageSetup;

    //Change spreadsheet size to fill the window (viewport) below the entry form
    function adjSpreadsheetSize() {
        var objSS = document.getElementById("OWC_data");
        var winWidth = document.documentElement.clientWidth;
        var winHeight = document.documentElement.clientHeight;

        winHeight -= document.getElementById('form_body').offsetHeight;

        objSS.height = winHeight;
        objSS.width = winWidth;
        return false;
    }

    function pageSetup() {
        adjSpreadsheetSize();
    }
</script>

[snip]
</head>
<body>
<form id="form1" runat="server" action="rawdata.aspx" method="get">
<div id="form_body">
[snip]
</div>
</form>
<div id="OWC_container">
    <object id="OWC_data" classid="clsid:0002E559-0000-0000-C000-000000000046">
    </object>
</div>

      

My setup:

  • WinXP Pro SP2
  • Microsoft Visual Studio 2008 Version 9.0.21022.8 RTM
    • Installed Edition: Professional
    • Microsoft Visual Basic 2008
    • Microsoft Visual C # 2008
    • Microsoft Visual C ++ 2008
    • Microsoft Visual Studio 2008 Tools for Office
    • Microsoft Visual Web Developer 2008
    • Crystal Reports Basic for Visual Studio 2008
  • Microsoft .NET Framework version 3.5 SP1
  • Website project resides on DEV server (mapped as local drive)
+1


source to share


2 answers


Since this is the active object you are trying to load, perhaps your MSIE is configured to trust http: // localhost more than http: // localhost: 1235 / foo ?

Other differences with IIS and ASP.NET Development Server:



IIS only turns some files into aspnet filter, ASP.NET dev server turns into IIS.

Also, sometimes changing the port # will change the behavior.

0


source


I added alert("Viewport: " + document.documentElement.clientHeight + " - formHeight: " + formHeight + " = " + winHeight);

For some reason, the "form_body" div is flipped between "421" and "435" (14 difference). So I added a border to try and see where the change is happening ... <div style="border: solid 1px red;" id="form_body">



And when the border is there, the size changes. Easy to reproduce ... add border style and resize 3 ~ 5 times. Remove the border and it fires repeatedly until I sit and stare.

WTF?

0


source







All Articles