Ver Mensaje Individual
  #13 (permalink)  
Antiguo 13/10/2005, 14:37
Spyn_ET
 
Fecha de Ingreso: diciembre-2003
Mensajes: 218
Antigüedad: 20 años, 4 meses
Puntos: 0
En Javascript encontré esta clase, q quizas os pueda ser util.

Código PHP:
function XMLUtil()
{
    
this.UNINITIALIZED 0;
    
this.LOADING       1;
    
this.LOADED        2;
    
this.INTERACTIVE   3;
    
this.COMPLETE      4;
    
this.isIE = (document.implementation.createDocument) ? false true;
}

XMLUtil.prototype.getXMLHTTPObject = function()
{
    if(
this.isIE)
    {
        return new 
ActiveXObject("Microsoft.XMLHTTP");
    }
    else
    {
        return new 
XMLHttpRequest();
    }
}

XMLUtil.prototype.getDOM = function()
{
    if (
this.isIE)
    {
        return new 
ActiveXObject("Microsoft.XMLDOM");
    }
    else
    {
        return new 
DOMParser();
    }
}

XMLUtil.prototype.getDOMFromString = function(xmlStr)
{
    var 
xmlDom this.getDOM();
    if (
this.isIE)
    {
        
xmlDom.async 'false';
        
xmlDom.loadXML(xmlStr);
        return 
xmlDom;
    }
    else
    {
        return 
xmlDom.parseFromString(xmlStr'text/xml');
    }
}

XMLUtil.prototype.getText = function(elem)
{
    if (
this.isIE)
    {
        return 
elem.text;
    }
    else
    {
        return 
elem.textContent;
    }
}

function 
replaceHTML(idNamecontent)
{
    var 
target document.getElementById(idName);    
    
target.innerHTML content
}
function 
BrowserDetection()
{
    var 
isIEisMozillaisSafariisOpera false;
    if (
navigator.userAgent.indexOf('MSIE') != -1)
        
this.isIE true;
    else if (
navigator.userAgent.indexOf('Safari') != -1)
        
this.isSafari true;
    else if (
navigator.userAgent.indexOf('Opera') != -1)
        
this.isOpera true;
    else
        
this.isMozilla true;

__________________
SymbianForever
SymbianForever.com, todo sobre y para tu symbian
aNieto2K | Themes para WordPress
De todo un poco