Foros del Web » Programando para Internet » Javascript » Frameworks JS »

Necesito ayuda para que funcione en IE

Estas en el tema de Necesito ayuda para que funcione en IE en el foro de Frameworks JS en Foros del Web. Buenas gente.. la idea es leer un xml/xsl... funciona perfecto en Firefox pero por más que intenté y busqué información no logro hacerlo funcionar en ...
  #1 (permalink)  
Antiguo 30/04/2009, 14:06
 
Fecha de Ingreso: abril-2009
Mensajes: 1
Antigüedad: 15 años
Puntos: 0
Necesito ayuda para que funcione en IE

Buenas gente.. la idea es leer un xml/xsl... funciona perfecto en Firefox pero por más que intenté y busqué información no logro hacerlo funcionar en Internet Explorer. Les paso la parte del código que no logro hacer que funcione.

function getHtmlFragment(xmlUrl, xslUrl) {
if (window.XSLTProcessor){
var xslStylesheet;
var xsltProcessor = new XSLTProcessor();
//carga el archivo xml
var xmlSource = getResponseXml(xmlUrl).responseXML;
//carga el archivo xsl
xslStylesheet = getResponseXml(xslUrl).responseXML;
xsltProcessor.importStylesheet(xslStylesheet);
return xsltProcessor.transformToFragment(xmlSource, document);
}

//HASTA ACA SERÍA EL CODIGO QUE FUNCIONA BAJO FIREFOX

else if(window.ActiveXObject){

ACA IRIA EL CODIGO QUE FUNCIONARIA BAJO IE.. ALGUIEN SABE COMO HACERLO???

Muchas gracias por la ayuda...
Nicolás
  #2 (permalink)  
Antiguo 06/06/2009, 15:00
 
Fecha de Ingreso: junio-2009
Mensajes: 4
Antigüedad: 14 años, 10 meses
Puntos: 0
Respuesta: Necesito ayuda para que funcione en IE

hola a quite dejo un ejemplo en ie adaptalo

var xml = new ActiveXObject("Microsoft.XMLDOM");
var xslt = new ActiveXObject("Microsoft.XMLDOM");

xml.async = false;
xslt.async = false;

xml.load("Beatles.xml");
xslt.load("Beatles.xsl");

var output = xml.transformNode(xslt);

var outputDiv = document.getElementById("Output");

outputDiv.innerHTML = output;
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 02:13.