aximbigfan
New Member
- Joined
- Oct 15, 2006
- Messages
- 847 (0.13/day)
- Location
- St. Louis, MO
System Name | QUAD1 |
---|---|
Processor | Intel Core i7 920 |
Motherboard | Asus P6T SE |
Cooling | XIGMATEK HDT-S963 |
Memory | OCZ 3 X 1GB Triple Channel |
Video Card(s) | HIS Radeon HD4670 IceQ |
Storage | Seagate 250GB 7200RPM SATA |
Display(s) | Acer AL1916W 19" Widescreen LCD |
Case | CM Storm Scout |
Audio Device(s) | Onboard |
Power Supply | Corsair 520 Watt |
Software | Windows XP Pro |
I have been trying for a long time, I just want this function to return a var, but no matter what, it doesn't work.
Anyone?
Thanks,
Chris
Code:
function ajax(url)
{
var http = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
http.onreadystatechange = function()
{
if (http.readyState == 4)
{
if (http.status == 200)
{
return http.responseText;
}
else
{
alert("AJAX Error! \nReturned Text: "+ http.statusText);
}
}
}
http.open("GET" ,url , true);
http.send(null);
}
Anyone?
Thanks,
Chris