By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,184 Members | 1,162 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,184 IT Pros & Developers. It's quick & easy.

Code 0: Access is denied message on attempted file read

P: n/a
Was just trying a small script to load a file and while it works if I
run it locally on my own pc if I try and access it on a remote web
server it generates an error code 0: Access is denied in IE:

<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function whatFile() {
window.location= 'file:///' + document.form1.cmuds.value;
}
// End -->
</script>
</HEAD>

<BODY>

<form name=form1>
<input type=file name="cmuds">
<input type=button onClick="whatFile()" value="Open File">
</form>

</BODY>
</HTML>

I am trying to load the same local (text) file in each case. Anyone
know what the problem is and whether I can get round it ?

Thanks

Jul 23 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
fe****@wk.net wrote:
Was just trying a small script to load a file and while it works if I
run it locally on my own pc if I try and access it on a remote web
server it generates an error code 0: Access is denied in IE:

<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function whatFile() {
window.location= 'file:///' + document.form1.cmuds.value;
}
// End -->
</script>
</HEAD>

<BODY>

<form name=form1>
<input type=file name="cmuds">
<input type=button onClick="whatFile()" value="Open File">
</form>

</BODY>
</HTML>

I am trying to load the same local (text) file in each case. Anyone
know what the problem is and whether I can get round it ?

You need access to local files. And client-side js doesn't; well, not
without jumping through hoops.
Mick
Jul 23 '05 #2

P: n/a
Is that true even the server is Windows? Is there a way to use Windows
host script interpreter to allow server side JS?

Jul 23 '05 #3

P: n/a
lk******@geocities.com wrote:
Is that true even the server is Windows? Is there a way to use Windows
host script interpreter to allow server side JS?

Both the server and the client *may* allow javascript.
Mick
Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.