/    Sign up×
Community /Pin to ProfileBookmark

Permission Denied – InnerHTML

I’ve got a script that retrieves the contents of an IFRAME to post with the form data, and it works fine in IE5.

IE6, however, generates a “Permission Denied” Error from the line:

return Editor.body.innerHTML;

Any ideas?

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@GeatauthorMar 07.2003 — I thought it was going to be that, but when I query the domains, they are both identical (i.e. of document and the IFRAME).

Also, I can't access any properties or methods of the IFRAME (as I have mentioned in a different post).

I've seen IFRAMEs that are very similat to mine and they work in IE6, so I know it's possible!
Copy linkTweet thisAlerts:
@GeatauthorMar 10.2003 — Wel, by query, I mean alert(framename.document.domain);
Copy linkTweet thisAlerts:
@GeatauthorMar 10.2003 — I should have explained a bit better, Editor is actually a variable that is set to editorframe.document.

However, I've got it working now so there's no worries - thanks for your time though!
Copy linkTweet thisAlerts:
@GeatauthorMar 10.2003 — Basically, the iframe was referenced from a number of methods, and I was using the Editor variable rather than an explicit reference. Changing it to the full document.form.iframe.document got it working. Silly mistake on my part...
×

Success!

Help @Geat spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.25,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...