469,964 Members | 1,534 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,964 developers. It's quick & easy.

Javascript :Access Denied Error

Hi,

I have an HTML form with a browse button for file upload. If in the text I directly type the file name then:
1. If I type full path, e.g d:\abc.pdf, then hitting submit works fine.
2. If I type just the file name, e.g abc.pdf, then hitting submit hangs the browser. Javascript error says : Access denied.
This problem is occuring in IE7. Works fine with firefox. I tried changing the browser setting like this : Tools>Internet Options> Security>Custom Level>Miscellaneous>>Access data source across domain : Prompt. It didnt change anything.

I know what the problem is, but I dont know how to solve this. At least the browser should not hang because of javascript error. I do have backend validation for this file. I just want to escape javascript error.

Thanks,
Shishir
MA, USA.
Jan 23 '08 #1
6 1921
RedSon
5,000 Expert 4TB
Next time try posting in the proper forum, instead of Misc. Questions.
Jan 23 '08 #2
acoder
16,027 Expert Mod 8TB
Is the page in the same directory as the file?
Jan 24 '08 #3
the page doesnt exist at all.
Even if it does, i get the same error in both case(same directory/different directory).

So in all case, I am getting this same error.
Jan 24 '08 #4
acoder
16,027 Expert Mod 8TB
What do you mean, the page doesn't exist? By page, I meant the HTML page containing the input file element.
Jan 25 '08 #5
I actually meant the 'file' to be uploaded, not the 'page'.
Jan 25 '08 #6
acoder
16,027 Expert Mod 8TB
I can't reproduce this error, but the file name should be selected using the Browse button. You can prevent users from entering into the file input box, if you want.
Jan 28 '08 #7

Post your reply

Sign in to post your reply or Sign up for a free account.

By using this site, you agree to our Privacy Policy and Terms of Use.