Getting Access Denied in JavaScript..

J

Jeff

I get an access denied on this one website that many people use (but
only on one computer - dozens of others work fine). I have made sure
they all have same IE and java, and I get error in Firefox also. Any
hit appreciated on where to look for a rights problem on access denied
error. What is weird, is if the user clicks refresh, it
works! Im not a programmer, just trying to narrow down the issue on a
server. Its Windows 2000sp4, IE6, jave 5 update 6. (TRIED SEVERAL
VERSIONS). Works fine on other servers for same sites. Here are 2
error lines from other 2 sites. I am using the MS Script debugger to
see and copy the below lines, if there is a better way or you need
more tell me.

Here is the line with the issue,

if (self.API != null && self.tracking.document.pwsTracking != null) {
self.content.location.href = contentUrl;
}else if(self.tracking.document.appletpea!= null)
{ //question appletpea


AND

var myDataSource = new YAHOO.widget.DS_XHR(myServer, mySchema);



THANK YOU SO MUCH>
 
T

Thomas 'PointedEars' Lahn

Jeff said:
I get an access denied on this one website that many people use

Which would be exactly? (URL?)
(but only on one computer - dozens of others work fine). I have made
sure they all have same IE and java,

You have been told in <ipFzi.54$hV.14@trnddc02> that Java != JavaScript,
have you not?

Note that the same Java (Runtime Engine) is irrelevant when it comes to
J(ava)Script, unless you access Java from J(ava)Script, as *maybe* here.

If the problem occurs only on one client, the JScript engine version might
be relevant. What does

javascript:window.alert(ScriptEngine() + " " + ScriptEngineMajorVersion()
+ "." + ScriptEngineMinorVersion() + "." + ScriptEngineBuildVersion())

show when typed in the Address Bar (without line-break) and pressed the
Return key? Is there a difference to the result other clients where it works?
and I get error in Firefox also. Any hit appreciated on where to look
for a rights problem on access denied error. What is weird, is if the
user clicks refresh, it works!

Probably the error messages you get are more verbose than what you post
here, even with IE.

http://www.jibbering.com/faq/#FAQ4_43

However, "Access denied" *may* indicate a violation of the Same Origin
Policy, forbidden cross-site scripting.
Im not a programmer, just trying to narrow down the issue on a server.

Do you understand that this is a client-side problem?
Its Windows 2000sp4, IE6, jave 5 update 6. (TRIED SEVERAL VERSIONS).

Windows 2000 *Server*?
Works fine on other servers for same sites.

Please be clear first whether you mean server-side or client-side programming.
Here are 2 error lines from other 2 sites.

And why would other sites be relevant? (Could you please define "site"
here, please?)
I am using the MS Script debugger to see and copy the below lines,
if there is a better way

Microsoft Visual Studio Express is available for free-of-charge download and
is said to be better than the MS Script Debugger. But I don't see how it
could help someone with no programming skills at all.
or you need more tell me.

[x] done
Here is the line with the issue,

if (self.API != null && self.tracking.document.pwsTracking != null) {
self.content.location.href = contentUrl;
}else if(self.tracking.document.appletpea!= null)
{ //question appletpea

So far no syntax error. Using `self' is error-prone (and unnecessary), but
it probably works in your environment.

I can only assume that `tracking' is the name of a(n i)frame, that
`appletpea' is the name of an `applet' or `object' element with name or ID
`appletpea', and `pwsTracking' is the name or ID of another element (as such
guessing is always involved with proprietary referencing like this, it is
not only error-prone but also hard to decipher for other people).

That would mean the frame document is checked for the existence of the
latter element, and if yes, the location of the `content' frame changes to
the value of `contentUrl'; if no, and there is the former element instead,
something else (which you snipped here) happens.

<ipFzi.54$hV.14@trnddc02> tells me (pretty-printed) that it is this:

| // initialize content window after the tracking applets have been loaded
| function initContent()
| {
| if (self.API != null && self.tracking.document.pwsTracking != null)
| {
| self.content.location.href = contentUrl;
| }
| // question appletpea
| else if (self.tracking.document.appletpea!= null)
| {
| self.content.location.href = contentUrl;
| }

Where the latter is entirely redundant, as the condition could be
OR-composed with the first condition:

if ((self.API != null && self.tracking.document.pwsTracking != null)
|| self.tracking.document.appletpea != null)

There's still redundancy left:

if (self.API && self.tracking.document.pwsTracking)
|| self.tracking.document.appletpea)

| else{
| setTimeout("initContent()", 500);
| }

And the last branch calls the method again in about 500 ms if the first two
tests fail.

Summarized, when that function is called, the script is waiting for
$something to be loaded. Apparently the test whether $something is
loaded or not fails at some point. Reason unknown.

Other than that, there is not enough information to make an educated guess.
AND

var myDataSource = new YAHOO.widget.DS_XHR(myServer, mySchema);

One cannot see from that code alone what it is intended to do. That
said, it is not unlikely that Yahoo!'s bad script code or an equally
bad implementation of it is causing the problem.
THANK YOU SO MUCH>

Please don't SHOUT. And you're welcome.


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top