Ver Mensaje Individual
  #3 (permalink)  
Antiguo 27/09/2005, 09:26
Avatar de JuanKa
JuanKa
 
Fecha de Ingreso: septiembre-2004
Mensajes: 468
Antigüedad: 19 años, 8 meses
Puntos: 1
Te coloco el codigo completo

<script language="javascript">
function fecha(){
today = new Date();
var x=String(today.getFullYear()).substr(2,4);
if(String(today.getMonth()+1).length<2)
x=x+"0";
x=x+String(today.getMonth()+1);
if(String(today.getDate()).length<2)
x=x+"0";
x=x+String(today.getDate());
return x;
}
//************************************************** ******
function hora(){
today = new Date();
y = new String();
if(String(today.getHours()).length<2)
y="0";
y=y+String(today.getHours());
if(String(today.getMinutes()).length<2)
y=y+"0";
y=y+String(today.getMinutes());
if(String(today.getSeconds()).length<2)
y=y+"0";
y=y+String(today.getSeconds());
return y
//return 195911;
}
//************************************************** ******
function carga()
{
document.frm_pago.Union.value=fecha()+hora();
var_codigo=document.frm_pago.Union.value;
return var_codigo;}
</script>

Ahora ese valor como lo recibo en
<body onLoad="javascript:carga()">

<form name="frm_pago" method="post" action="mipagina.php">

<input type=hidden name=Union value =??????????? >
</form>
...
...
...
...