Código HTML:
Ver original
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <script type="text/javascript"> function createREQ() { try { req = new XMLHttpRequest(); /* p.e. Firefox */ } catch(err1){ try { req = new ActiveXObject('Msxml2.XMLHTTP'); /* algunas versiones IE */ } catch (err2) { try { req = new ActiveXObject("Microsoft.XMLHTTP"); /* algunas versiones IE */ } catch (err3) { req = false; } } } return req; } http = new createREQ(); function requestPOST(){ http.open("POST", "pos.php", true); http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); http.onreadystatechange = getpos; http.send(""); } function getpos(){ if(http.readyState == 4){ if(http.status == 200){ xml = http.responseXML; dato = xml.getElementsByTagName("pos")[0].childNodes[0].nodeValue; document.getElementById("pos").innerHTML=dato; } } } a = setInterval(requestPOST(), 1000); </script> </head> <body> </body> </html>
Código PHP:
Ver original
<?php $doc = "documento.txt"; $rand = "$r1,$r2"; echo '<?xml version="1.0" encoding="UTF-8" ?> <poss> <pos> '.$pos.' </pos> </poss>'; ?>
el problema es que el intervalo nunca sucede...
ayuda porfavor
![apachar ojo](http://static.forosdelweb.com/fdwtheme/images/smilies/wink.png)