/    Sign up×
Community /Pin to ProfileBookmark

JS Error: Access Denied…

Hello all,

If anyone could help on this one, it would be much appreciated.

I’ve spend a lot of time trying to figure this out. So I finally decided to ask you experts for help!

This is my problem:

On my domain I’m using Frame Redirect!
On my page I have this piece of code, which generates and Error on the status bar on IE, stating Access Denied!

Here’s the code that I have on that page:

<script language=”JavaScript”>
<!–
document.write(“<img src=”http://mypath/log.cgi?ref=”+top.document.referrer+”” width=1 height=1 border=0>”);
//–>
</script>
<noscript>
<img src=”http://mypath/log.cgi?ref=noscript” width=1 height=1 border=0>
</noscript>

Now I think what’s causing the error is the “top.document.referrer”!!! How do I change the code, or add something to it so that it doesn’t cause the error???
Thanks for any help!

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@khalidali63Apr 11.2003 — Typically access denied error is gnerated when you are trying to access any info about a webpage that resides on some other domain then yours,Its a built in browser security feature and JavaScript can not manipulate it.

Cheers

Khalid
Copy linkTweet thisAlerts:
@Dr_DKauthorApr 11.2003 — That I know!

But I've accessed it through another domain, but this domain wasn't working on Frame Redirect!

It's the Frame Redirect that's making it cause error.

I've tryed all sorts of stuff. CHMODS, and everything. But then I came up with:

top.main

instead of

top.document.referrer

Which only generades the referrers as undefined!

But thanks for your help! Do you or anybody else know how to resolve it?

Thank you!
×

Success!

Help @Dr_DK 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.16,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

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