Hi all,

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();
        var currentname = scrapeText($('nameWrap'));
        var nameinput = SPAN({'id': 'nameWrap', 'class': 'namechanger'},
                INPUT({'id': 'nameEditInput', 'class': 'inlineInput',
'value': currentname}, null));
        var editdongle = A({'href': '', 'id': 'nameEdit', 'class':
'editdongle confirm'}, 'Done');

        swapDOM('nameWrap', nameinput);
        swapDOM('nameEdit', editdongle);

        addToCallStack($('nameEdit'), 'onclick', confirmNameEdit());

        return false;

    }
}

addToCallStack($('nameEdit'), 'onclick', clickNameEdit());

(the addToCallStack call is actually wrapped in an initPage function).

Again, works with no problems on FF.  In IE I get the following error:

Line: 2784
Char: 1
Error: 'undefined' is null or not an object
Code: 0
URL: http://url.of/my/page

This error occurs every time I click a link or even rollover an DOM
object that has had it's onmouseover/onmouseout modified, and it's
identical every time.

Is there something I'm doing wrong here or is there some way to work
around this?

Thanks in advance,

Lee

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" 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/mochikit
-~----------~----~----~----~------~----~------~--~---

Reply via email to