<html>
<head>
<script language="javascript" type="text/javascript">
function $(v) {
return document.getElementById(v);
}
var lastIntervalID;
function setFechaHora(s) {
var d = new Date();
var hours = d.getHours();
var mins = d.getMinutes();
var sec = d.getSeconds();
//alert(hours + ":" + mins + ":" + sec);
var value = hours + ":" + mins + ":" + sec;
var obj = $(s);
obj.value = value;
//document.getElementById(
//document.getElementById('recibida').value = value;
//document.getElementById('montada').value = value;
//document.getElementById('procedesde').value = value;
//document.getElementById('procehasta').value = value;
//document.getElementById('recibida2').value = value;
//document.getElementById('montada2').value = value;
//document.getElementById('procdesde').value = value;
//document.getElementById('prochasta').value = value;
//document.getElementById('avisodesde').value = value;
//document.getElementById('avisohasta').value = value;
//document.getElementById('pdf').value = value;
}
function loadTimers() {
$('recibida').attributes['interval'].value = window.setInterval('setFechaHora(\'recibida\');', 1000);
$('montada').attributes['interval'].value = window.setInterval('setFechaHora(\'montada\');', 1000);
$('procedesde').attributes['interval'].value = window.setInterval('setFechaHora(\'procedesde\');' , 1000);
$('procehasta').attributes['interval'].value = window.setInterval('setFechaHora(\'procehasta\');' , 1000);
$('recibida2').attributes['interval'].value = window.setInterval('setFechaHora(\'recibida2\');', 1000);
$('montada2').attributes['interval'].value = window.setInterval('setFechaHora(\'montada2\');', 1000);
$('procdesde').attributes['interval'].value = window.setInterval('setFechaHora(\'procdesde\');', 1000);
$('prochasta').attributes['interval'].value = window.setInterval('setFechaHora(\'prochasta\');', 1000);
$('avisodesde').attributes['interval'].value = window.setInterval('setFechaHora(\'avisodesde\');' , 1000);
$('avisohasta').attributes['interval'].value = window.setInterval('setFechaHora(\'avisohasta\');' , 1000);
$('pdf').attributes['interval'].value = window.setInterval('setFechaHora(\'pdf\');', 1000);
}
</script>
</head>
<body onload="loadTimers();">
//todo esto funciona de lo mas bien//
<form action="" method="post" name="form1" id="form1">
<td bgcolor="#F1F1F1"><input name="recibida" type="text" id="recibida" value="<? echo "$recibida"; ?>" readonly interval="" /></td>
<td bgcolor="#F1F1F1"><input type="button" name="button" id="button2" value="Terminado" onclick="window.clearInterval($('recibida').attrib utes['interval'].value);"/></td>
</form> //como hago para crear la condición para que le de prioridad al echo y si no hay nada ahi colocar el script//
![Pensando](http://static.forosdelweb.com/fdwtheme/images/smilies/scratchchin.gif)
</body>
</html>