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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error: Access is denied (help!!)

Status
Not open for further replies.

angel0910

Programmer
Jun 26, 2002
17
0
0
SG
when add a javascript to an image object to open a new window, it gives me an error "Access is denied"

<script>
function openNewWin()
{
window.open ('language.htm','Language_Selector','scrollbars=no,status=no,width=200,height=100');
}
</script>

<a href=&quot;javascript:eek:penNewWin();&quot;>
<img src=&quot;top_files/language.gif&quot; width=&quot;48&quot; height=&quot;10&quot; border=&quot;0&quot;></a>

the page i am trying to open is in the same directory as this current page.
when i tried it with other pages of the same directory it works. could any kind souls help me? :)
 
why dont u try it after changing the file name...

what u have done is correct... but some browsers....

Known is handfull, Unknown is worldfull
 
hi :)
i've tried changing the filename it still gives me the &quot;Access is denied&quot; error...
What I have done should be correct? :)
 
O.K, all other pages- are they also html files?

are u running this via a server or directly?

what is ur OS?

Known is handfull, Unknown is worldfull
 
all files are with &quot;.htm&quot; extension...

i'm running locally for now...

my OS is Windows 2000 server...

:)
 
O.K i am testing ur code. it works fine for me...

once i faced a peculiar problem but that was with XP and it gave error for all pages...

try checking permissions...

Known is handfull, Unknown is worldfull
 
Stupid doubt, but i want to know when the error comes? when u click on the image or after the popup opens?

Known is handfull, Unknown is worldfull
 
I am having a similar problem. I am running locally and have the following:

<SCRIPT language=&quot;javascript&quot;>

window.open(&quot;1010_010.htm&quot;,&quot;newWin&quot;,&quot;fullscreen&quot;);
self.opener = self;

self.moveTo((&quot;1&quot;),(&quot;1&quot;))
self.resizeTo((&quot;400&quot;),(&quot;400&quot;))
void(outerWidth=400);
void(outerHeight=400);


</SCRIPT>
This is at the start of the file. It used to just run and load the .htm file as specified, but now I get the Access is Denied error...never had this before and haven't changed that piece of code. Any ideas?? THANKS!
 
this is a security error. some versions of IE or windows do not allow a window.open in javascript (if the file is run locally then no problem). but if a file in the server tries to access a file in the client system then it will show an &quot;Access Denied&quot; error.

Known is handfull, Unknown is worldfull
 
Thanks for your reply. I am running locally. I can do the window.open on the same laptop when the .htm file that does it is in a different directory. I created another file folder to contain all .htm code I'm working with on this project and now the autostart won't work. The .htm file that contains the javascript in question runs, gives the security error, but the rest of the page displays.

Is there separate security on different directories? If so, how to change? I'm running IE 6 with Windows 2000 Professional.

Any help GREATLY appreciated. Thanks!
 
the problem is that it CANNOTBE OVERCOME. as i said before it is a security issue and is dependent on the OS...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top