Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Permission Denied

Status
Not open for further replies.

JavaDude32

Programmer
Aug 25, 2001
180
US
I'm having this problem with the following line:

if(parent.Results.location.href == "processing.htm")//Error! Here!
{
parent.Results.location.href = "Results.htm";
}

at the top of the page this line exists:

<base target=&quot;Map&quot;>

But I don't think setting the base target prevents you from accessing a higher frame? Also, the troublesome line comes after a document.write so is that a problem?
 
if the location is not in your domain, you will get a permission denied error.



=========================================================
try { succeed(); } catch(E) { tryAgain(); }
-jeff
 
something minor: the href is not needed after the location


____________________________________________________
The most important part of your thread is the subject line.
Make it clear and about the topic so we can find it later for reference. Please!! faq333-2924

onpnt2.gif
 
hmm, that's suprising, I thought the href would be needed for a string and yes it was in the same domain. Thanks
 
looks like you keep coming up with this one jemminger [smile]
thread216-318144

____________________________________________________
The most important part of your thread is the subject line.
Make it clear and about the topic so we can find it later for reference. Please!! faq333-2924

onpnt2.gif
 
do you have norton or another firewall running?

____________________________________________________
The most important part of your thread is the subject line.
Make it clear and about the topic so we can find it later for reference. Please!! faq333-2924

onpnt2.gif
 
I tried to remove the <base target> tag, still no luck. All the files are in the same directory, are there JavaScript security settings that are modifiable somewhere?

IE version 6.0 if that helps (the syntax seems right to me though, I've seen it in plently of tutorials)


<script type=&quot;text/JavaScript&quot; Language=&quot;Javascript&quot;>
var Width;
var Height;

if (document.all)
{
Height = document.body.clientHeight - 30;
Width = document.body.clientWidth - 30;
}
else if (document.layers)
{
Height = parent.Map.innerHeight - 30;
Width = parent.Map.innerWidth - 30;
}

var objId = '<object id=&quot;map&quot; classid=&quot;clsid:F5D98C43-DB16-11CF-8ECA-0000C0FD59C7&quot;';
objId += ' WIDTH=&quot;' + Width + '&quot; HEIGHT=&quot;' + Height + '&quot;>';
objId += ' <param name=&quot;FileName&quot; value=&quot;<%=MapFileName%>&quot;>';
objId += '<embed src=&quot;<%=MapFileName%>&quot;';
objId += ' WIDTH=&quot;' + Width + '&quot; HEIGHT=&quot;' + Height + '&quot;>';
objId += &quot;</object>&quot;
document.write (objId);

if (document.all)
{
document.images[0].style.display = &quot;none&quot;;
}
if (document.layers)
{
document.layers[&quot;procImg&quot;].visibility = &quot;hide&quot;;
}

if(parent.Results.location == &quot;processing.htm&quot;)//Error! Here!
{
parent.Results.location = &quot;Results.htm&quot;;
}

</script>
 
you can turn off javascript in advanced internet options in IE but that is about as far as it goes for that concern. I'll test it unless someone else has some input

____________________________________________________
The most important part of your thread is the subject line.
Make it clear and about the topic so we can find it later for reference. Please!! faq333-2924

onpnt2.gif
 
I don't think I even have Norton on this machine (work machine), no process that looks similiar @ least. Nothing that I can see indicates a problem.
 
I'm at a loss, tried it and it ran fine but one thing I changed
Height = window.clientHeight - 30;
Width = window.clientWidth - 30;
which is insignificant for this error



____________________________________________________
The most important part of your thread is the subject line.
Make it clear and about the topic so we can find it later for reference. Please!! faq333-2924

onpnt2.gif
 
I'm thinking it might be local system settings, but there's nothing under internet explorer to prevent it and I'm doubting the ASP is preventing the javascript. The thing that gets me was that the script worked fine this morning, gotta love coding at times.
 
I'd like to inquire about just the very basic issue here. First, my code snippet appears below, which has problems when it is a child frame in the same domain as its parent.

<body>
<script language=&quot;javascript&quot; type=&quot;text/javascript&quot;>
if (parent.location.href == self.location.href) {
document.writeln(&quot;<h2>Text for Top</h2>&quot;); }
else { document.writeln(&quot;<h2>Text for In-frame</h2>&quot;); }
. . .

As I understand from this thread and other sources, the reason one would get a &quot;permission denied&quot; in IE is due to different domains. But this child frame is in the same domain as its parent. Over the past couple months, I have had 2 users report the &quot;permission denied&quot; error once or twice; clearing the cache took care of the problem(!). Now I have one user who sees the error all the time.

So my question is: why would this be intermittent, and is there a way to do the above test without causing the problem?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top