468,765 Members | 1,657 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

-2147024891 "Access is denied" in javascipt please help ASAP

Hi,

Here's a code snippet,
Above is the html code and below is the javascript function
Am Getting an error: -2147024891 "Access is denied"
<body onload="Load();">
<form method=post name=frmbrowse ENCTYPE="multipart/form-data"
ID="Form1">
<table>
<tr>
<td>
<input type=hidden name="strOrder" id="strOrder">
<Input onpropertychange="javascript:Upload();"
style="display:none" TYPE="FILE" NAME="browsedocument" SIZE="60"
class="InputBox" ID="File1">
</td>
</tr>
</table>
</form>
</body>

function Load()
{
document.frmbrowse.browsedocument.click();}
}

function Upload()
{
document.frmbrowse.action ="Anyurl";
try{
document.frmbrowse.submit();
}
catch(err)
{
alert(err.number+" "+err.description);
}
}

Jul 23 '05 #1
1 4634
Vaibhav Vashisht wrote:
Hi,

Here's a code snippet,
Above is the html code and below is the javascript function
Am Getting an error: -2147024891 "Access is denied"
<body onload="Load();">
<form method=post name=frmbrowse ENCTYPE="multipart/form-data"
ID="Form1">
<table>
<tr>
<td>
<input type=hidden name="strOrder" id="strOrder">
<Input onpropertychange="javascript:Upload();"
style="display:none" TYPE="FILE" NAME="browsedocument" SIZE="60"
class="InputBox" ID="File1">
</td>
</tr>
</table>
</form>
</body>

function Load()
{
document.frmbrowse.browsedocument.click();}
}

function Upload()
{
document.frmbrowse.action ="Anyurl";
try{
document.frmbrowse.submit();
}
catch(err)
{
alert(err.number+" "+err.description);
}
}

Hi,

Local files accessed by javascript for uploadpurposes are crippled on
purpose.
I am not sure what is the problem here, but I expect the browser (JS) wants
the client to press the submit-button when a local file is selected for
upload.
(Maybe to protect the client against selecting the wrong file, then JS
submits it when the client actually wants to make another selection.)
Not sure... but you said urgent. :-)

Good luck.

Regards,
Erwin Moller
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

14 posts views Thread by Jeff | last post: by
63 posts views Thread by Jerome | last post: by
1 post views Thread by Shun | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.