Mensajes [1] - Enviado el Jueves 03 de Junio de 2010 a las 17:37hs
Hola gente, espero que esten todos bien.
Preciso hacer una cuenta regesiva con ajax entre dos fechas. cuestion que en mozilla funciona barbaro, pero en explorer no fnciona.
el link donde pueden verlo es gorally.com.ar/prueba_time1.php
este es el codigo:
<?
include_once("conexion.inc.php");
?>
<script>
function rota(){
setInterval("ajaxFunction4()",1000);
}
rota();
//------------------------------------------------ajax counter
la= 1;
function ajaxFunction4(){
try{
//Firefox, Opera 8.0+, Safari
xml=new XMLHttpRequest();
}
catch (e){
// Internet Explorer
try{
xml=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e){
try{
xml=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
alert("Tu navegador no soporta Ajax");
}
}
}
xml.onreadystatechange=function(){
if(xml.readyState==4){
// document.write(xml.responseText);
document.getElementById("counter").innerHTML=xml.r esponseText
}
}
xml.onreadystatechange=function(){
if(xml.readyState==4){
// document.write(xml.responseText);
document.getElementById("counter").innerHTML=xml.r esponseText
}
}
la = la + 1;
if(la == 4){
la=1
}
if(la == 0){
la=3
}
xml.open("GET","prueba_time1.php?");
xml.send(null);
}
//------------------------------------------------fin ajax counter
</script>
<div style="font-size:12px;font-family:arial;color:#000000" id="counter">
<?
$sql_fecha = mysql_query("select * from counter");
$lee_fecha = mysql_fetch_assoc($sql_fecha);
$fecha_encuesta = $lee_fecha["mundial"];
$partes = explode("/",$fecha_encuesta);
$cuenta = count($partes)-1;
$ano = $partes[$cuenta];
$dia = $partes[0];
$mes = $partes[1];
$fecha1 = mktime(20,00,00,$mes,$dia,$ano);
//$fecha2 = mktime(16,00,00,6,2,2010);
$fecha2 = time();
$diferencia = $fecha1-$fecha2;
$minutos = $diferencia / 60;
$minutos = $minutos % 60;
$horas = (int)($diferencia/(60*60));
$dias = (int)($diferencia/(60*60*24));
$horas = $horas % 24;
//$minutos = ($horas % 60) / 60;
$hora1 = mktime($horas,0,0,0,0,0);
$hora2 = date("s",time());
$segundos = 60 - $hora2;
echo"DIAS:".$dias;
echo"<br>";
echo"HORAS:".$horas;
echo"<br>";
echo"MINUTOS:".$minutos;
echo"<br>";
echo "SEGUNDOS:".$segundos;
?>
</div>
Desde ya muchas gracias!
ROME
Mensajes [46] - Enviado el Sabado 22 de Enero de 2011 a las 04:02hs
Abercrombie And Fitch
Abercrombie
abercrombie uk
abercrombie london
abercrombie sale
Abercrombie And Fitch UK
Abercrombie And Fitch sale
Abercrombie And Fitch outlet
Abercrombie outlet
abercrombie and fitch hoodies
abercrombie and fitch london
abercrombie & fitch uk
abercrombie fitch uk
abercrombie fitch
abercrombie & fitch
rosetta stone
rosettastone
stone language
rosetta stone reviews
the rosetta stone
rosetta stone discount
rosetta stone language
rosetta stone software
rosetta stone language learning
rosetta stone online
rosetta stone coupon
rosetta stone spanish
p90x workout schedule
p90x workout schedule
p90x workout schedule
Abercrombie And Fitch
Abercrombie
abercrombie uk
abercrombie london
abercrombie sale
Abercrombie And Fitch UK
Abercrombie And Fitch sale
Abercrombie And Fitch outlet
Abercrombie outlet
abercrombie and fitch hoodies
abercrombie and fitch london
abercrombie & fitch uk
abercrombie fitch uk
abercrombie fitch
abercrombie & fitch
p90x workout schedule