Esta es mi página web...el problema,cuando chequeo
<td><input type="checkbox" name="checkbox" value="checkbox" onClick = "CubreHoraSolucion()">
entra en la funcion CubreHoraSolucion() pq me sale el mensaje del alert pero sin embargo no se rellena este textbox
<td><input type="text" name="Data" size="25"></td>
Espero que alguien me ayude ...llevo 3 dias dandole vueltas y me da salido.
<?php
$conexion = mysql_connect("localhost", "xxx","xxx");
mysql_select_db("incidencia", $conexion);
$varnombre = $_POST['userAdmin'];
$varpassword = $_POST['passAdmin'];
session_start();
$totEmp = -1;
$queEmp = "SELECT userAdmin FROM administrador where userAdmin ='".$varnombre."' and login = '".$varpassword."' ";
$resEmp = mysql_query($queEmp, $conexion);
$totEmp = mysql_num_rows($resEmp);
$consulta = "select usuario,id_incid,extel,servicio,descripcion,fecha_ incid,descripcion,solucionado,fecha_solucion,id_ad min from incidencia";
$resConsult = mysql_query($consulta, $conexion);
if ($totEmp>0){
?>
<html>
<head>
<title>Páxina de incidencias</title>
<SCRIPT LANGUAGE="JavaScript">
function runClock()
{
theTime = window.setTimeout("runClock()", 1000);
var today = new Date();
var display= today.toLocaleString();
status=display;
}
function CubreHoraSolucion()
{
var fecha = new Date();
alert (fecha);
document.form1.Data.value = fecha;
}
</SCRIPT>
</head>
<body bgcolor="d2b568" onLoad="runClock()">
<?
$_SESSION["Usuario"] = $_POST['userAdmin'];
?>
<br>
<img src="vs-an.png">
<br>
<br>
<form action="muestra.php" name="form2" method="post">
<center> <b>
<select name="Estado" ></b>
<option value="Todos" selected>Todos</option>
<option value="Solucionado" >Solucionados</option>
<option value="NoSolucionado" >No solucionados</option>
</select>
<input type="submit" name="Mostrar" value="Mostrar"></center>
</form>
<br>
<br>
<form name="form1" method="post" action="">
<center>
<table width="80%" border="2" cellspacing="1" cellpadding="1">
<tr bordercolor="#000000" bgcolor="#993333">
<th width="110" scope="col"><span class="Estilo5">Usuario</span></th>
<th width="70" scope="col"><p class="Estilo3 Estilo6">Nº incidencia </p></th>
<th width="77" scope="col"><p class="Estilo5">Extensión</p>
<p class="Estilo5">Telefono</p></th>
<th width="90" scope="col"><span class="Estilo5">Servicio</span></th>
<th width="90" scope="col"><span class="Estilo5">Incidencia</span></th>
<th width="82" scope="col"><span class="Estilo5">Fecha Incidencia </span></th>
<th width="92" scope="col"><p class="Estilo5">Descripcion</p>
<p class="Estilo5">acción</p></th>
<th width="90" scope="col"><span class="Estilo5">Solucionado</span></th>
<th width="65" scope="col"><span class="Estilo5">Fecha Solucion </span></th>
<th width="90" scope="col"><span class="Estilo5">Administrador</span></th>
</tr>
<?php
while ($registro = mysql_fetch_row($resConsult)) {
?>
<tr bordercolor="#000000" bgcolor="#999999">
<td><textarea name="textfield" cols="10"><?php echo $registro[0] ?> </textarea></td>
<td><textarea name="textfield2" cols="7"><?php echo $registro[1] ?> </textarea></td>
<td><textarea name="textfield3" cols="7"><?php echo $registro[2] ?> </textarea></td>
<td><textarea name="textfield4" cols="10"><?php echo $registro[3] ?> </textarea></td>
<td><textarea name="textarea" cols="20"><?php echo $registro[4] ?></textarea></td>
<td><textarea name="textarea2" cols="13"><?php echo $registro[5] ?></textarea></td>
<td><textarea name="textarea3"><?php echo $registro[6] ?></textarea></td>
<td><input type="checkbox" name="checkbox" value="checkbox" onClick = "CubreHoraSolucion()">
<td><input type="text" name="Data" size="25"></td>
<td><textarea name="textarea4" cols="10"><?PHP echo $_SESSION["Usuario"];?> </textarea></td>
</tr>
<?php
}
mysql_free_result($resConsult);
mysql_close($conexion);
?>
</table>
</center>
</form>
</body>
</html>
<?php
}
else
{
?>
<html>
<head>
<title>Xestión de incidencias </title>
<center><img src="vs-an.png" ></center>
</head>
<br>
<br>
<body bgcolor ="b33a42">
<center> <h1> </h1>
<pre><h2 class="Estilo1">Benvido a area de xestión de incidencia</h2>
<h5>Esta e unha sección reservada para administradores</h5>
</pre>
</center>
<pre>
<form action="compruebaAdministrador.php" method="POST">
<br>
Usuario:
<input type="text" name="userAdmin" size="20" maxlength="20"><br>
Login:
<input type="password" name ="loginAdmin" size="20" maxlength="20"><br>
<input name="submit" type="submit" value="Enviar" >
<br>
Usuario incorrecto
</form>
</pre>
</p>
</body>
</html>
<?php
}
?>