Jump to content

[SOLVED] HTTPRequest Object not creating right


Liquid Fire

Recommended Posts

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?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.