Seems I sent the wrong function.  Here is the one from MochiKit.Async
I added that's being used:

    doJSONPostXMLHttpRequest: function (url, obj) {
        var self = MochiKit.Async;
        var req = self.getXMLHttpRequest();
        var data = MochiKit.Base.serializeJSON(obj);
        req.open("POST", url, true);
        var requestHeaders =
           ['X-Requested-With', 'XMLHttpRequest',
            'X-MochiKit-Version', repr(MochiKit.Async),
            'Accept', 'text/javascript, text/html, application/xml,
text/xml, */*',
            'Content-type', 'application/json'];
        /* Force "Connection: close" for Mozilla browsers to work around
         * a bug where XMLHttpReqeuest sends an incorrect Content-length
         * header. See Mozilla Bugzilla #246651.
         */
        if (req.overrideMimeType) {
            requestHeaders.push('Connection', 'close');
        }
        for (var i = 0; i < requestHeaders.length; i += 2) {
            req.setRequestHeader(requestHeaders[i], requestHeaders[i+1]);
        }
        return self.sendXMLHttpRequest(req, data);
       },

--~--~---------~--~----~------------~-------~--~----~
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