Firing native events like click and 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