Liquid Fire Posted February 3, 2007 Share Posted February 3, 2007 my code for create my ajax object(well really HTTPRequest Object) function CreateAjaxObject() { var test = null; if(window.XMLHttpRequest) { test = "FF"; alert(test); return new XMLHttpRequest(); } else if(window.ActiveXObject) { test = "IE"; alert(test); return new ActiveXObject("Microsoft.XMLHTTP"); } } when i load this in FireFox i get the alert bos with FF in it like it should but when i open it up in IE7, i get an alert box with FF in it too but it should be IE. I think this is why my ajax stuff it not working right in IE but why is IE7 not creating the right object, is it something in my code? Quote Link to comment Share on other sites More sharing options...
Liquid Fire Posted February 3, 2007 Author Share Posted February 3, 2007 NVM, i found the IE7 now supports the first version and the else clause is for anyone using IE6 and lower FIXED. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.