INPUT TYPE=FILE JavaScript Error

  • Thread starter Thread starter TJM
  • Start date Start date
T

TJM

Hi,

A Javascript error is generated when the user types a few character in an
INPUT TYPE=FILE and hits a submit button. The form does not post. Is there a
solution to this problem?

Thanks
TJM
 
Hi,
Hi,

A Javascript error is generated when the user types a few character in an
INPUT TYPE=FILE and hits a submit button. The form does not post. Is there a
solution to this problem?

Thanks
TJM

My crystal ball's batteries are empty... can you post the error, as well
as an extract of your code where the error can be reproduced?

Thanks,
Laurent
 
There is no code involved! Just an INPUT TYPE=FILE and a LinkButton.
The JavaScript error is: Access is denied.

Thanks
TJM
 
There has to be javascript. Where are you getting the error from?
Javascript is being called somewhere for there to be an error.
 
Are you ever going to post the Javascript? Are you ever going to tell
us what the error is?
 
As I mentioned before, the error is Access is denied. The javascript is the
standard javascript generated by ASP.NET to post a form!
 
Okay.. .this may not be much help but I have ran into this problems before.

IF you are opening this page up in a popup or a named window, make sure the
window name is not being used or two windows open at the same time. This
has given me Access Denied errors in the past. Also improper syntax in the
window.open function will lead to this as well.

I have also ran into this when I click the button to do something and use
javascript to direct me away from that page (like next step type of a thing)
if the script is not in the right place (i.e. called too early) it will give
you an Access Denied error.

This is all the information I have based on the information you were able to
provide, that might be of help.

Good Luck!
 
CAN.
YOU.
PLEASE.
POST.
THE
JAVASCRIPT.

As I mentioned before, the error is Access is denied. The javascript is the
standard javascript generated by ASP.NET to post a form!
 
I stumbled across this post just now as I happen to be having the same
issue. I think what he means by "no code" is that it is all
generated for you by ASP.NET. Below is the generated code. Note this
appears to not be an issue with Firefox. If someone has any ideas on
this issue please reply!

//file control
<input name="fileSelector" id="fileSelector" type="file" size="50" />


//autogenerated "linkbutton"
<a id="btnPerformOperation" href="javascript:{if
(typeof(Page_ClientValidate) != 'function' || Page_ClientValidate())
__doPostBack('btnPerformOperation','')} ">Submit</a>


//autogenerated script
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1)
{
theform = document.frmValueListNew;
}
else {
theform = document.forms["frmValueListNew"];
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit(); //"Access is Denied" error here
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top