Mira ocupa librerias ya creadas facilitan mucho la vida...
No estoy muy familiarizado con esto
Código Javascript
:
Ver original//Browser Support Code
function ajaxFunction(){
var ajaxRequest; // The variable that makes Ajax possible!
try{
// Opera 8.0+, Firefox, Safari
ajaxRequest = new XMLHttpRequest();
}catch (e){
// Internet Explorer Browsers
try{
ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
}catch (e) {
try{
ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
}catch (e){
// Something went wrong
alert("Your browser broke!");
return false;
}
}
}
Pero con la librerias como jquery no necesitas andar evaluando nada de esto..
Además con una libreria hay muchas cosas prefabricadas y no necesitas reinventar la rueda..
http://docs.jquery.com/Tutorials#Tut...n_espa.C3.B1ol