Ver Mensaje Individual
  #21 (permalink)  
Antiguo 27/09/2007, 13:43
Avatar de AbdelioR
AbdelioR
 
Fecha de Ingreso: septiembre-2006
Ubicación: Tarragona
Mensajes: 926
Antigüedad: 17 años, 7 meses
Puntos: 8
Re: MiniChat con PHP/MySQL/AJAX v2.0

Ups, no se que hacia fuera del body. Pues en php me defiendo, en lo otro menos ya... (era una pregunta irónica?)

El código es este:


principal.html
Código HTML:
<body style="font-size:10px; font-family:Verdana, Arial, Helvetica, sans-serif;"> 
<embed src="light.wav" autostart=false width=0 height=0 id="sound1" enablejavascript="true" >
  <div id="chat" style="border:1px solid #990000; width:150px;"></div> 
...
...
...
...

ajax.js
Código:
...
...

function EvalSound(soundobj) {
  var thissound=document.getElementById(soundobj);
  thissound.Play();
}

function fajax2()
 {
    var ajax;
    ajax=ajaxFunction02();
    ajax.onreadystatechange=function()
      {
      if(ajax.readyState==4)
        {
        document.getElementById('chat').innerHTML=ajax.responseText;	
        }
      }
	EvalSound('sound1');
    ajax.open("get","index.php?Leer=si",true);
    ajax.send(null);    
 } 

...
...