Environment: -
Language: - html, javascript
Browser : - Internet Explorer 8
Problem Description: -
I have a html form (fileupload.htm) with a html file upload control inside of it.
<formid="frmupload"name="upload"enctype="multipart/form-data"action="fileuploadhandler.aspx"method="post">
<inputid="uploader"name="uploadctrl"type="file"/>
</form>
.
We also have defined one javascript method in the above page which is like:
function performUpload(){
document.getElementById('frmupload').submit();
}
.
I call this inside of a page (uploadpage.htm) from within an iframe:
<iframeid="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?
.
Kindly assist us to know best way to implement this requirement.