From: panore on
hello Friends

I have to trigger a click event of file upload control from
javascript.

The file upload click events works nice in IE (from javascript) but
creates problem in Firefox.

So friends is there any way to do it ?

Pls help.

Regards
sunil Panore

From: Sean Kinsey on
On Apr 20, 4:44 pm, panore <su...(a)cybersurfindia.com> wrote:
> hello Friends
>
> I have to trigger a click event of file upload control from
> javascript.
>
> The file upload click events works nice in IE (from javascript) but
> creates problem  in Firefox.
>
> So friends is there any way to do it ?
>
> Pls help.

As far as I know its not possible.
Most libraries that display a custom button for selecting files
actually places the input field (which have a builtin click listener)
on top of the button and sets its opacity to 0.

From: Evertjan. on
panore wrote on 20 apr 2010 in comp.lang.javascript:

> hello Friends
>
> I have to trigger a click event of file upload control from
> javascript.

You are never required to do the impossible.

It would be a very bad thing if it were,
since it would be a security breach,
as you could upload files from my pc without my authorisation.

So better not be trigger-happy.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
From: Sean Kinsey on
On Apr 20, 5:19 pm, "Evertjan." <exjxw.hannivo...(a)interxnl.net> wrote:
> panore wrote on 20 apr 2010 in comp.lang.javascript:
>
> > hello Friends
>
> > I have to trigger a click event of file upload control from
> > javascript.
>
> You are never required to do the impossible.
>
> It would be a very bad thing if it were,
> since it would be a security breach,
> as you could upload files from my pc without my authorisation.

That is not correct as there are other precautions in place for this.
As an example, I believe you cannot set the value property of a file
input, and in newer browsers you cannot read the _real_ path after it
is set either.
From: Jorge on
On Apr 20, 5:19 pm, "Evertjan." <exjxw.hannivo...(a)interxnl.net> wrote:
>
> It would be a very bad thing if it were,
> since it would be a security breach,
> as you could upload files from my pc without my authorisation.

No, you'd just be presented with a dialog box to select a file, istm.
--
Jorge.