I think I am going to start extending "fire" to fire dom events. It
doesnt make sense to me that prototype abstracts the dom in every form
except firing events. If element.observe can wire dom events then
element.fire should fire them. The only thing I can think of that
this isnt done is that no one has done it yet.
On Jan 10, 7:59 pm, RobG <[EMAIL PROTECTED]> wrote:
> On Jan 11, 9:17 am, Michael <[EMAIL PROTECTED]> wrote:
>
> > I'm trying to fire the click event of my parent node. This is for
> > asp.net backwards compability. Right now I have
>
> How does the server technology affect how you do this?
>
>
>
> > if(parentcontrol.fire)
> > {
> > parentcontrol.fire('click');
>
> Have you considered:
>
> if (parentcontrol.onclick) { parentcontrol.onclick();}
>
> which doesn't simulate a click, but there is no reasonable cross-
> browser way of doing that anyway (see below).
>
> > // __doPostBack(convertID(parentcontrol.id));
> > }
>
> > This will not dispatch and click my parent.
>
> Dispatching events is another story - there's IE's fireEvent and the
> W3C dispatchEvent, both will bubble and fire other hanlders, but
> triggering default actions associated with the elements is mostly not
> supported.
>
> e.g. dispatching a click event to a link does not cause the link to be
> followed, however sending a click to a sumbit button submits the form
> in Firefox (dispatchEvent) but not in IE (fireEvent).
>
> --
> Rob
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---