Ver Mensaje Individual
  #10 (permalink)  
Antiguo 30/10/2011, 01:56
dleal100
 
Fecha de Ingreso: septiembre-2011
Mensajes: 158
Antigüedad: 12 años, 7 meses
Puntos: 15
Respuesta: leer csv con javascript

ESTO FUERSA AL NAVEGADOR A MOSTRAR EL ARCHIVO CSV e_e

Código:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>titulo</title>
<script type="text/javascript">
function caca()
{
var xmlhttp;
if (window.XMLHttpRequest)
  {
  xmlhttp=new XMLHttpRequest();
  }
else
  {
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById("caca").innerHTML=xmlhttp.responseText;
    }else{document.getElementById("caca").innerHTML="cargando...";}
  }
xmlhttp.open("GET","datose.csv",true);
xmlhttp.send();
}




</script>
</head>
<style type="text/css">
#caca{background-color:#CCC;
margin:0px auto;
width:500px;
padding:10px 10px 10px 10px;
cursor:pointer;
}
</style>
<body>
<div id='caca' onclick='caca();'>VER EL ARCHIVO</div>

</body>
</html>

Última edición por dleal100; 30/10/2011 a las 02:01