Click to See Complete Forum and Search --> : Mozilla Permission Denied
bfarrell
12-06-2003, 04:47 AM
I have a page with a linked js library. Also on the page I have an iframe. Within the iframe I have a document generated wholly with code. Some of the objects within the code require the use of functions in the external js library. I get a premission denied error whenever I try to access any of the functions. The odd thing is that there are some functions integral to the master page which I can call no problem from within the iframe. The page has no problem running in IE but Moziall based browsers all give me the same error.
Any help much appreciated.
Brian
Khalid Ali
12-06-2003, 07:11 AM
it seems like Mozilla sees your external file as out of domain file(if it is then trying to access it will cause this error).
This is serious security check on Mozilla's behalf,and the only thing around it will be to not use sucha resource(out of domain resource that is)
bfarrell
12-06-2003, 09:10 AM
Tx for the response Khalid.
Unfortunately this is a major problem as the library is large and has to be obfuscated when it finally ships as a product.
Seems like such a simple thing to have. I can't believe it doesn't let me do this. Guess I'll have to keep pluggin away at it unless anyone else has any suggestions.
Brian
Pittimann
12-06-2003, 09:18 AM
Hi!
Just an idea:
If the document in question is "generated wholly with code", why don't you just add the code of the external .js?
Get the contents of the .js file by the file generating the one which needs the script and when generating it, have the "generator" write the script tag into the head section and insert the .js file's code between the opening and the closing script tag...
Cheers - Pit
bfarrell
12-06-2003, 09:23 AM
I haven't included the js file in the iframe document because there can be multiple iframes using the same library, thus the need to link via one place, that being the parent document. Lib is about 70k.
Brian
ray326
12-06-2003, 05:22 PM
Originally posted by bfarrell
I haven't included the js file in the iframe document because there can be multiple iframes using the same library, thus the need to link via one place, that being the parent document. Lib is about 70k.
Brian
Is this concern one of global variables or page load times? If the latter, the browser should only be downloading the file once and then getting it from its cache after that.
bfarrell
12-07-2003, 04:56 PM
I tried as you suggested by inserting this line into the iframe HEAD section of the IFRAME document:
<script language='JavaScript1.2' src='/wsf/websubform.js'></script>
Which is the same line that also appears in the HEAD of the parent page.
If I try calling a function in the library from an object inside the IFRAME without prefixing the function name with parent. I get an undefined error.
It's like it doesn't see the included js file at all.
This happens in Mozilla FB and IE.
HELP!!!