By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,700 Members | 1,663 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,700 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.