/    Sign up×
Community /Pin to ProfileBookmark

permission exception when access to frame content

I need my script to analyze some external web page content

I use iframe to load this page and try to get content by this code:

[CODE]var iframe = document.getElementById(“loadFrame”);

var text = iframe.contentWindow.document.body.innerHTML;[/CODE]

And I get exception “[I]Error: uncaught exception: Permission denied to get property HTMLDocument.body[/I]” in Firefox Browser.

How i can bypass this problem ?

Or what another way to get content of external page ?

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@CharlesSep 25.2005 — JavaScript will not let you monkey with somebody else's page.
Copy linkTweet thisAlerts:
@DnKrozzauthorSep 25.2005 — Now I realize its a security hole.

But I need this page only localy for me.

Maybe there are settings to switch this off in firefox ?

Sorry if offtopic question.
Copy linkTweet thisAlerts:
@DnKrozzauthorSep 25.2005 — Problem resolved using mozilla user.js with capability.policy settings.
×

Success!

Help @DnKrozz 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 6.2,
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: @meenaratha,
tipped: article
amount: 1000 SATS,

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

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...