Javascript :Access Denied Error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shishirkumar
    New Member
    • Jan 2008
    • 3

    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>Miscellan eous>>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.
  • RedSon
    Recognized Expert Expert
    • Jan 2007
    • 4980

    #2
    Next time try posting in the proper forum, instead of Misc. Questions.

    Comment

    • acoder
      Recognized Expert MVP
      • Nov 2006
      • 16032

      #3
      Is the page in the same directory as the file?

      Comment

      • shishirkumar
        New Member
        • Jan 2008
        • 3

        #4
        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.

        Comment

        • acoder
          Recognized Expert MVP
          • Nov 2006
          • 16032

          #5
          What do you mean, the page doesn't exist? By page, I meant the HTML page containing the input file element.

          Comment

          • shishirkumar
            New Member
            • Jan 2008
            • 3

            #6
            I actually meant the 'file' to be uploaded, not the 'page'.

            Comment

            • acoder
              Recognized Expert MVP
              • Nov 2006
              • 16032

              #7
              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.

              Comment

              Working...