On Feb 27, 2006, at 8:26 AM, Lee McFadden wrote:
> I've been writing some fairly complex JS for inline
editing of text
> using http://
trac.mochikit.com/wiki/HowtoSimpleAjax as a basis for
> making my links ajax enabled rather than using the
> href="javascript:someFunction()" nastyness.
>
> It all seems to work beautifully on FF, however IE is a
different
> matter altogether.
>
> Here is the shortest of the functions that I'm using,
but it is
> typical of the functions i've created:
>
> var clickNameEdit = function () {
> return function (evt) {
> //prevent the normal 'click' action for a
link
> evt.stopPropagation();
> evt.preventDefault();
,.. this is broken on IE because IE does events in an
entirely
different way than Firefox does. The ajax tables and
sortable tables
examples in the MochiKit distribution have examples of
correct cross-
browser onclick handling. Wiki content isn't really
reputable until
proven otherwise -- in this case, that page is not (unless
you only
care about FF, of course).
In MochiKit 1.3, there's the signal module that makes it
easier to
write correct cross-browser event code, but it doesn't seem
to be
quite finished yet in SVN trunk (still fails plenty of
tests).
-bob
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "MochiKit" group.
To post to this group, send email to mochikit googlegroups.com
To unsubscribe from this group, send email to
mochikit-unsubscribe googlegroups.com
For more options, visit this group at http://groups
.google.com/group/mochikit
-~----------~----~----~----~------~----~------~--~---
|