0

I have to implement an existing frameset with JavaScript/jQuery. I´ve embedded the developer version jQuery JavaScript Library v1.9.0.

Every time the right-frame loaded a new HTML-file a function will check the content of this new loaded document. This process will fail sometimes, it´s not possible to understand when (and why) because it occurs randomly.

This is the line which will try to access the frames content:

var Jrightframe  = $(iframe.find('frameset#myID frameset frame[name="right"]').get(0).contentWindow.document);

Sometimes, as I said it above, the message will be:

SCRIPT70: permission denied jquery.js, line 3882 character 2

I think it´s a same origin policy problem because I tried this locally (C: partition). But what is the problem to load a file from the partition if the js-script runs on the same partition?

Can somebody please help me to find out what´s going on here?

tshepang
  • 12,111
  • 21
  • 91
  • 136
user3292653
  • 602
  • 1
  • 7
  • 25
  • This post seems to have some info on it being an old jQuery bug: http://stackoverflow.com/questions/17370482/preventing-script5-access-is-denied-error-in-ie – MackieeE Feb 17 '14 at 13:10
  • Actually I already posted the error I get in the console! – user3292653 Feb 17 '14 at 13:12
  • Apologies!! I'll edit :) (Along with a possible fix) – MackieeE Feb 17 '14 at 13:13
  • IMHO the option that the js is quicker than the iframe is impossible, because the function handler calls the function which will access the frames content only on load .load() – user3292653 Feb 17 '14 at 13:14
  • I have read the thread and tried to use it with jquery jquery-1.10.0.min.js as they recommended, but that didn´t solve the problem. it is also a different error message – user3292653 Feb 17 '14 at 13:21

1 Answers1

0

I searched a long time and found multiple problems like my problem. Ok here is what solved the problem: Update the jquery core to v1.11.0. It seems only to appear in older versions.

user3292653
  • 602
  • 1
  • 7
  • 25