One of my job duties is supporting an old online app (written as an ISAPI dll). A customer has reported one function as not working any more. He says he's using IE8 on Win7 but I can only duplicate the issue with IE9 on Win7. The app is heavily javascript dependent and uses IE-specific code. No JQuery or other javascript libraries are used. It was written back in 2002 or therebouts and required IE 5.5 or newer.
The app has multiple nested frames (yes, it's a PITA). The problem seems to happen when trying to access the contents of a frame from a popup modal window. The user clicks on a button image in that frame which opens the modal dialog window. The user changes options in that window and clicks the 'ok' button. At that point, the changes should be sent to the server and the frame updated. But that's not happening and no error is displayed to the user to give a hint.
The authors of this app created a debug mode which logs a bunch of messages in a separate browser window. I added some additional debug statements and narrowed down the problem. This is the error text being logged:
[SERV REQ #13] requesting fraUOMTraces=/isapi/dataminer.dll/UOMTraceList?sfn=220333606&sfn=220333606&UOM=1&TdmUserHierarchy_cdsStats_SmoothTime=1800&TdmUserHierarchy_cdsStats_SmoothType=Boxcar&TdmUserHierarchy_cdsStats_SmoothMinMax=avg
*-* RequestDocument oReq.Request: /UOMTraceList (13)
*** ERROR *************************************************
Error while retrieving oDoc (13)!
Number = -2146828218
Description = Permission denied
Name = TypeError
Message = Permission denied
***********************************************************
'fraUOMTraces' is the name of the frame. That first line is the request that should be sent to the server. 'oReq' is a custom javascript object (a 'RequestObj') that holds a bunch of details about the server request.
In Error while retrieving oDoc (13)
, 'oDoc' should contain the document object of the frame. But when trying to retrieve that property from the oReq object, the "Permission denied" error is generated. Here's the code where that happens:
this.RequestDocument = function(oReq){
var oDoc = null;
DebugText("*-* RequestDocument oReq.Request: " + oReq.Request + " (" + oReq.RequestID + ")");
try{
//== try to get the document for this request
oDoc = oReq.Destination.document;
//== Now try to get the document if we are in a frame
oDoc = oReq.Destination.contentWindow.document;
}catch(err){
//== No big deal, this happens if we are not in a frame
if(oDoc == null) {
DebugError("Error while retrieving oDoc (" + oReq.RequestID + ")!", err);
}
}
return oDoc;
}
Any ideas on what would cause the "Permission denied" error in this circumstance? I've fiddled with the various IE options/settings and haven't been able to find anything that affects the issue. This error does not display on XP/IE8 or on a co-workers Win7 with IE8.
If you made it through this long message and are curious enough to take a stab at the problem, I can give you a link to the app and 'guest' credentials to see it in action.
-Dave