If you are using the Report Manager like me (2005 version) there is not much you can do about the ReportViewer control. (is there?) There is an alternative, though:
Phil s solution effectively disables the code run by the onload event of a an iframe. In SSRS 2005 this is an iframe with id ctl140TouchSession0 :
<iframe name="ctl140TouchSession0" id="ctl140TouchSession0" onload="if (frames[ ctl140TouchSession0 ].location != javascript: ) frames[ ctl140TouchSession0 ].location.replace( javascript: );" src="javascript: " style="position:absolute;width:0;height:0;border-width:0;visibility:hidden;">
You can see the offending code in the onload event - the Render code disables the if statement by adding " && false" to the condition.
The following javascript accomplishes the same thing by emptying the onload after the page is loaded, stopping the loop.
(Add this at the bottom of [MSSQL Reporting services Folder]ReportManagerjsReportingServices.js)
// CUSTOMIZATIONS
addLoadEvent(customize);
//some browser-independent onload-adder I pulled from somewhere
function addLoadEvent(fn)
{
if (window.addEventListener)
window.addEventListener( load , fn, false);
else if (window.attachEvent)
window.attachEvent( onload , fn);
}
function customize()
{
//the actual fix.
//check first, we may be in a page without a reportviewer
if(document.getElementById( ctl140TouchSession0 ))
document.getElementById( ctl140TouchSession0 ).onload = "";
}
Note: I am unsure what the onload event actually does and if removing it like this kills some other functionality. There should be some way to change the onload in the same way as Phil s solution, or a browser dependent fix, but this does the trick and I have not encountered problems in IE yet.