Hi…Hopefully someone explain this to me. I have an issue where I loop through some frames in a frameset and when I get to a frame that has a embedded PDF file as the source for that frame I get the following javascript error; “Access is denied”.
This issue is related to the mircrosoft cumulative secutiy update MS06-072. This I have confirmed; I can execute the code without the patch with no problems and then when its applied it fails. It also should fail if your running IE7, more than likely because this patch is already applied to IE7. I have no clue what it is in this security update that is causing this “Access is Denied” error. I would appreciate any insight into this so that i can get around it or at least why it occurs.
[url]http://support.microsoft.com/kb/925454
The error occurs in the javascript when it hits this line;
fp.frames[i].document
I am trying to access the document object on the frame and it gives me a error. I can access frame properties but i can’t access anything related to the document object on the frame with the embedded PDF.
I have attached the code below; sorry i tried to put attachments but its failing when i try to upload. Just copy the following code to produce; The files generated are clickHereFirst.html,frame_a.htm,frame_c.htm and a test2.pdf.
This is the first file that launches everything.
clickHereFrist.html
[CODE]
<head>
<script type=”text/javascript”>
function test1(){
test2(top);
}
function test2(fp){
for (var i=0; i<fp.length; i++){
var Obj = fp.frames[i].document;
}
}
</script>
</head>
<html>
<frameset rows=”15%,70%,15%”>
<frame src=”frame_a.htm”/>
<frame src=”test2.pdf”/>
<frame src=”frame_c.htm”/>
</frameset>
</html>
2. Frame_a.htm
[CODE]
<head>
</head>
<html>
FRAME 1
</html>
3. Frame_c.htm
[CODE]
<head>
</head>
<html>
Frame 3
<form>
<input type=”button” value=”TEST” onclick=”parent.test1();”>
</form>
</html>
4. test2.pdf
For this just create a blank txt file and rename it as a pdf. It doesn’t have to
have any content so long as its a pdf.
Sorry for the long post and thank you to anyone who can help.