I have found the problem to be in IE7's native XMLHttp support.

You'll notice that the getXMLHttpRequest function in Async.js tries to
first return the native XMLHttpRequest followed by the ActiveX
objects:
     var tryThese = [

                function () { return new XMLHttpRequest(); },
                function () { return new
ActiveXObject('Msxml2.XMLHTTP'); },
                function () { return new
ActiveXObject('Microsoft.XMLHTTP'); },
                function () { return new ActiveXObject('Msxml2.XMLHTTP.
4.0'); },
                function () {
                    throw new
MochiKit.Async.BrowserComplianceError("Browser does not support
XMLHttpRequest");
                }

If IE7 native support is enabled (in tools --> properties -->
advanced), then the native request will be returned, and this native
request does not work for my purposes.  If I force the activeX object
to be returned in IE7, I have no problems.

For now, I have reordered the functions in tryThese to start with
return new ActiveXObject('Microsoft.XMLHTTP').  I would rather that IE
fixed their native support so that I don't have to change anything in
Mochikit.  Alternativly, you can uncheck the Enable XMLHttp support
box in IE7's advanced options.

I hope this helps!




On Mar 3, 11:03 am, "carlo" <[EMAIL PROTECTED]> wrote:
> In previous messages I thought my problems due to some quirks in IE
> DOM, but after some hours of tries I am wondering: what's wrong with
> Mochikit.Async and IE?
>
> Some code:
>
> var caricacombo=function(tipo) {
> if (tipo=='progetti') {
> var d=postJSON('http://192.168.9.1:8081/da/combo.py',
> {'combocontents':tipo});
> d.addCallback(FillCombo);}}
>
> var FillCombo=function(analist) {
> alert("TEST");------------>IE never shows this!
> var comboana=document.getElementById("anagr");
> var comboresp=document.getElementById("resp");
> var combostato=document.getElementById("stato");
> var l=analist.anagr.length;
> var j=0;
> while (j<l) {
> comboana.options[j]=new Option(analist.anagr[j],analist.anagr[j]);
> j=j+1;}
>
> .....other combos here....}
>
> var postJSON=function(url,postVars){
> var req=getXMLHttpRequest();
> req.open("POST",url,true);
> req.setRequestHeader("Content-Type","application/x-www-form-
> urlencoded");
> var data=queryString(postVars);
> var d=sendXMLHttpRequest(req,data);
> return d.addCallback(evalJSONRequest);
>
> }
>
> OK in FF but IE never gets to Alert("TEST"). I tried via POST because
> with loadJson I had similar or worse problems (always ok in FF). I
> please any hints..


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to