Update 1:
Cannot reproduce this on a co-worker's computer (same setup as mine) so I assume this is a problem with my workstation and not a general one.
I'd appreciate it if someone would close this question as I don't have enough reputation to do it myself.
@MatthewMartin. Thanks for your comments :-)
Update 2:
Unlike my coworker, I have VS90sp1-KB945140-ENU.exe (SP1) and VS90SP1-KB957912-x86.exe (JS Intellisense hotfix) installed on my machine. That appears to be the only difference between our setups. I removed both of them, but that didn't solve my problem.
In my asp.net (C#) page is a little bit of Javascript to resize an object when the user resizes the window.
When I access the page using IE6 on my DEV server (IIS), it works.
When I access the page using IE6 via VS2008 using F5 or CTRL-F5 (both of which start the ASP.NET Development Server) it fails. It seems to enter an infinite loop of resizing where the adjSpreadsheetSize
function fires the window.resize event, which invokes adjSpreadsheetSize
... Repeat ad infinitum
I see quite a few people out there complaining that IE6 can't properly handle onresize events, but nobody seems to be having this precise problem.
Any idea why this code works on IIS but not on ASP.NET Development Server?
Here's the relevant part of the 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
- The Website project lives on the DEV server (mapped as a local drive)