Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3487586
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T11:10:02+00:00 2026-05-18T11:10:02+00:00

I have a HTML form ( upload.htm ) with a HTML file upload control

  • 0

I have a HTML form (upload.htm) with a HTML file upload control inside of it.

<form id="frmupload" name="upload" enctype="multipart/form-data" action="uploadhandler.ashx" method="post">
    <input id="uploader" name="uploadctrl" type="file"/>
</form>

There is also one JavaScript method in the above page which goes like:

function performUpload(){
    document.getElementById('frmupload').submit();
}

I call this inside of a page (uploadpage.htm) from within an iframe:

<iframe id="docframe" src="upload.htm" style="display:none"></iframe>

I try to execute the statement shown below from the uploadpage.htm page:

var i = document.getElementById('docframe');
i.contentWindow.performUpload();

I get an error saying Access is denied, and my debugger halts at the first JavaScript function I’ve shown. Both the files are in the same location in the web project. They have the same domain name too. Why do I get this error then?

Of course, earlier, I could post the page: when I did not set the name attribute for the HTML upload control. But after I set the name attribute in HTML markup, I get this weird error. Why didn’t I get this the first time?

Had a look @ this post –> "Access is denied" when script tries to access iframe in IE8, but it didn’t help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T11:10:02+00:00Added an answer on May 18, 2026 at 11:10 am

    IE doesn’t allow manipulation of the type=”file” input element from javascript due to security reasons. Setting the filename or invoking a click event to show the browser dialog will result in an “Access is denied” error on the form submit – Internet Explorer is clever about remembering what methods have been invoked.

    Similar issue: http://www.webdeveloper.com/forum/showthread.php?t=181272

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following html form... <html> <head><title>Upload Servlet</title></head> <body><h2>Upload Servlet</h2> <form name='uploadparams' enctype='multipart/form-data'
I have an HTML form - with PHP, I am sending the data of
I have a HTML form, and I have a Controller Action that accepts the
Is it legal to have an HTML form with more than one hidden control
I have a form in HTML where our users fill in the data and
I have a HTML form with fields such as name, address, notes, etc. I
I have the following code sample upload3.php: <html> <head> <title>PHP Form Upload</title> </head> <body>
I have an html page and I want to upload a file usign the
I have an html form that allows the user to browse for a file
I have a form where a user can upload a file to the sites

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.