Ver Mensaje Individual
  #10 (permalink)  
Antiguo 09/02/2006, 05:33
wakewakeup
 
Fecha de Ingreso: octubre-2004
Mensajes: 878
Antigüedad: 19 años, 6 meses
Puntos: 1
Soy nuevo en ajax y tengo el mismo problema que tu, buscando por google he encontrado esta pagina donde dan una solución:
http://forum.java.sun.com/thread.jsp...590&tstart=105

A mi me funciona pero no se si es un poco rebuscada y hay otra cosa mas sencilla...

El codigo es este:

Código:
//Just to check if it is a different navigator from internet explorer
if (document.implementation && document.implementation.createDocument){
xmlDoc = requester.responseXML;
//In case to be the internet explorer
} else if (window.ActiveXObject){
//Create a xml tag in run time
var testandoAppend = document.createElement('xml');
//Put the requester.responseText in the innerHTML of the xml tag
testandoAppend.setAttribute('innerHTML',requester.responseText);
//Set the xml tag's id to _formjAjaxRetornoXML
testandoAppend.setAttribute('id','_formjAjaxRetornoXML');
//Add the created tag to the page context
document.body.appendChild(testandoAppend);
//Just for check put the xmlhttp.responseXML in the innerHTML of the tag
document.getElementById('_formjAjaxRetornoXML').innerHTML = requester.responseText;
//Now we can get the xml tag and put it on a var
xmlDoc = document.getElementById('_formjAjaxRetornoXML');
//So we have a valid xml we can remove the xml tag document.body.removeChild(document.getElementById('_formjAjaxRetornoXML'));\n" +
}
else{
//If the browser doesnt support xml
alert('Your browser can\\'t handle this script');
}