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

INPUT TYPE=FILE JavaScript Error

P: n/a
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
May 21 '06 #1
Share this Question
Share on Google+
11 Replies


P: n/a
Hi,

TJM wrote:
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
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch
May 21 '06 #2

P: n/a
TJM
There is no code involved! Just an INPUT TYPE=FILE and a LinkButton.
The JavaScript error is: Access is denied.

Thanks
TJM
"Laurent Bugnion" <lb******@bluewin.ch> wrote in message
news:44**********@news.bluewin.ch...
Hi,

TJM wrote:
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
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch

May 22 '06 #3

P: n/a
There has to be javascript. Where are you getting the error from?
Javascript is being called somewhere for there to be an error.

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

Thanks
TJM
"Laurent Bugnion" <lb******@bluewin.ch> wrote in message
news:44**********@news.bluewin.ch...
Hi,

TJM wrote:
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
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch


May 22 '06 #4

P: n/a
TJM
You are right! but this is the Javascript injected by ASP.NET!

"Ray Booysen" <rj***********@rjb.za.net> wrote in message
news:e9****************@TK2MSFTNGP04.phx.gbl...
There has to be javascript. Where are you getting the error from?
Javascript is being called somewhere for there to be an error.

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

Thanks
TJM
"Laurent Bugnion" <lb******@bluewin.ch> wrote in message
news:44**********@news.bluewin.ch...
Hi,

TJM wrote:
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
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch


May 22 '06 #5

P: n/a
Are you ever going to post the Javascript? Are you ever going to tell
us what the error is?

TJM wrote:
You are right! but this is the Javascript injected by ASP.NET!

"Ray Booysen" <rj***********@rjb.za.net> wrote in message
news:e9****************@TK2MSFTNGP04.phx.gbl...
There has to be javascript. Where are you getting the error from?
Javascript is being called somewhere for there to be an error.

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

Thanks
TJM
"Laurent Bugnion" <lb******@bluewin.ch> wrote in message
news:44**********@news.bluewin.ch...
Hi,

TJM wrote:
> 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
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch

May 22 '06 #6

P: n/a
TJM
As I mentioned before, the error is Access is denied. The javascript is the
standard javascript generated by ASP.NET to post a form!
"Ray Booysen" <rj***********@rjb.za.net> wrote in message
news:ui****************@TK2MSFTNGP04.phx.gbl...
Are you ever going to post the Javascript? Are you ever going to tell us
what the error is?

TJM wrote:
You are right! but this is the Javascript injected by ASP.NET!

"Ray Booysen" <rj***********@rjb.za.net> wrote in message
news:e9****************@TK2MSFTNGP04.phx.gbl...
There has to be javascript. Where are you getting the error from?
Javascript is being called somewhere for there to be an error.

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

Thanks
TJM
"Laurent Bugnion" <lb******@bluewin.ch> wrote in message
news:44**********@news.bluewin.ch...
> Hi,
>
> TJM wrote:
>> 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
> --
> Laurent Bugnion, GalaSoft
> Software engineering: http://www.galasoft-LB.ch
> Private/Malaysia: http://mypage.bluewin.ch/lbugnion
> Support children in Calcutta: http://www.calcutta-espoir.ch

May 22 '06 #7

P: n/a
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!
"TJM" <tm******@cybiz.com> wrote in message
news:Ot**************@TK2MSFTNGP02.phx.gbl...
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

May 22 '06 #8

P: n/a
CAN.
YOU.
PLEASE.
POST.
THE
JAVASCRIPT.
TJM wrote:
As I mentioned before, the error is Access is denied. The javascript is the
standard javascript generated by ASP.NET to post a form!
"Ray Booysen" <rj***********@rjb.za.net> wrote in message
news:ui****************@TK2MSFTNGP04.phx.gbl...
Are you ever going to post the Javascript? Are you ever going to tell us
what the error is?

TJM wrote:
You are right! but this is the Javascript injected by ASP.NET!

"Ray Booysen" <rj***********@rjb.za.net> wrote in message
news:e9****************@TK2MSFTNGP04.phx.gbl...
There has to be javascript. Where are you getting the error from?
Javascript is being called somewhere for there to be an error.

TJM wrote:
> There is no code involved! Just an INPUT TYPE=FILE and a LinkButton.
> The JavaScript error is: Access is denied.
>
> Thanks
> TJM
>
>
> "Laurent Bugnion" <lb******@bluewin.ch> wrote in message
> news:44**********@news.bluewin.ch...
>> Hi,
>>
>> TJM wrote:
>>> 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
>> --
>> Laurent Bugnion, GalaSoft
>> Software engineering: http://www.galasoft-LB.ch
>> Private/Malaysia: http://mypage.bluewin.ch/lbugnion
>> Support children in Calcutta: http://www.calcutta-espoir.ch


May 22 '06 #9

P: n/a
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("m icrosoft") > -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
}

May 31 '06 #10

P: n/a
I see same problem.But problem is in windows XP,in windows 2000 it
works correctly!!!

wa********@gmail.com yazdi:
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("m icrosoft") > -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
}


Jun 21 '06 #11

P: n/a
You must use a fully qualified path when you use the input file field in
Windows XP SP2. Here's a link to the KB article:

http://support.microsoft.com/default...b;en-us;892442

And always remember, Microsoft did this is by design ;-)

*** Sent via Developersdex http://www.developersdex.com ***
Jun 27 '06 #12

This discussion thread is closed

Replies have been disabled for this discussion.