Ver Mensaje Individual
  #3 (permalink)  
Antiguo 11/04/2006, 16:23
Avatar de B**
B**
 
Fecha de Ingreso: enero-2006
Ubicación: Monterrey,Mexico
Mensajes: 952
Antigüedad: 18 años, 3 meses
Puntos: 3
Pues lo hace en explorer, pero el problema es q le doy click al boton y sale el mensaje k tenia en el php pero se desaparece solito y bien rapido.. y pues en el firefox no funciona..el codigo final q tengo es este:
Código PHP:

<html>
<
head>
       <
script languaje="javascript">

            function 
nuevoAjax() {
                    var 
xmlhttp=false;
                    try {
                    
xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
                        } catch (
e) {
                    try {
                    
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
                         } catch (
E) {
                            
xmlhttp=false;
                    }
                    }
                    if (!
xmlhttp && typeof XMLHttpRequest!='undefined') {
                        
xmlhttp=new XMLHttpRequest();
                    }
                    return 
xmlhttp;
                }

           function 
getData(datasource,divID) {
                    
contenedor=document.getElementById(divID);
                    
ajax=nuevoAjax();
                    
ajax.open('GET',datasource,false);
                    
ajax.onreadystatechange=function() {
                    if (
ajax.readyState==4) {
                        
contenedor.innerHTML=ajax.responseText;
                    }
                    }
                
ajax.send(null);
                }
    
</script>
</head>
<body>
            <form>
                <input type =submit value = "enseña msg" onclick ="getData('data.php','targetDiv')">
            </form>

    <div id="targetDiv">

    </div>

</body>
</html> 
Alguna sugerencia?