On 30/08/06, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
>
> John Resig schrieb:
> >> // If IE is used, create a wrapper for the XMLHttpRequest object
> >> if ( !XMLHttpRequest && ActiveXObject )
> >>         XMLHttpRequest = function(){
> >>                 return new ActiveXObject(
> >>                         navigator.userAgent.indexOf("MSIE 5") >= 0 ?
> >>                         "Microsoft.XMLHTTP" : "Msxml2.XMLHTTP"
> >>                 );
> >>         };
> >
> > I assume that you didn't try that code, because it freaks out in IE
> > (if memory serves me correctly - maybe it was Opera). I'll probably
> > change it to this:
> >
> > if ( jQuery.browser.msie && XMLHttpRequest == undefined )
>
>
> Ah yes, we already talked about that long ago :-)
> http://jquery.com/discuss/2006-March/004137/
>
> Should look like
>
> if ( typeof XMLHttpRequest == 'undefined' && typeof window.ActiveXObject
> == 'function') {
>
>
> -- Klaus
>

That (using typeof) seems like a better solution (than
jQuery.browser.msie) as you should only browser sniff as a last
resort.

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to