For the interested, this is not possible in Firefox as of its current
release. Routing a click event to the file input does seem to work in
IE6+IE7 and Safari 3 though.

On Feb 4, 9:50 am, solidhex <patr...@solidhex.com> wrote:
> Thanks David, I'll see what I come up with ;)
>
> On Feb 4, 3:14 am, david <david.brill...@gmail.com> wrote:
>
> > Hi,
>
> > I think that every body has understand, but there is no way to do $
> > ('elem').click() on FF.
> > This work on IE, and simulate a realclickon the element, but it's
> > not (I don't think !) in standard.
> > And thanks, because I did not know it works in Safari.
>
> > so you should have to use a tricks to use it.
> > If you like such a function, try to create your own, and extend the
> > element !
>
> > --
> > david
>
> > On 4 fév, 03:13, solidhex <patr...@solidhex.com> wrote:
>
> > > I should try asking this another way, because I dont think I was clear
> > > before.
>
> > > Is it possible to emulate theclick() method that IE and Safari 3 seem
> > > to support using Prototype?
>
> > > I
>
> > > On Jan 30, 4:08 am, Радослав Станков <rstan...@gmail.com> wrote:
>
> > > > Firing native events likeclickand others is not available.
> > > > You can try with custom events 
> > > > -http://www.prototypejs.org/api/element/fire
> > > > ( unfortunately, there isn't much documentation on the official site :
> > > > ( , but google helps in this case)
>
> > > > or use this hack witch jdalton wrote here :http://pastie.org/255119
>
> > > > Element.addMethods({
> > > >     fire: Event.fire.wrap(function(proceed, element, eventName, memo)
> > > > {
> > > >       element = $(element);
> > > >       var w, event, eventID;
> > > >       $w(eventName)._each(function(name) {
> > > >         // use original "fire" if it's a custom:event
> > > >         if (name.include(':'))
> > > >           return proceed(element, name, memo);
>
> > > >         // handle native events
> > > >         eventID = (element._prototypeEventID || [null])[0];
> > > >         if (!eventID || !(w = Event.cache[eventID][name])) return
> > > > false;
>
> > > >         // poor man's event object
> > > >         event = Event.extend({ });
> > > >         event.eventName = name;
> > > >         event.memo = memo || { };
>
> > > >         // execute event wrappers
> > > >         w._each(function(wrapper) { wrapper(event) });
> > > >       });
> > > >       return element;
> > > >     })
> > > >   });
>
> > > > p.s. This $(ement).fire('click') must be in the core I think, but
> > > > don't have enough free time lately to fire a ticket
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to