El codigo al cual he llegado es el siguiente pero estoy abierto a cambiar el codigo como fuera necesario si se os ocurre otra manera mucho mas sencilla.
Código:
<html>
<head>
<title>entra sale</title>
</head>
<body>
<form name="form1" id="form1">
<input type="text" name="a" id="a" />
<input type="text" name="b" id="b" />
<?php
include("connect.php");
$result = mysql_query("select Seccion from secciones");
while($row = mysql_fetch_array($result))
{
printf("<input type=button value=%s onclick=chequeo() />", $row['Seccion']);
}
?>
<SCRIPT>
function chequeo(){
var long = (form1.a.value.length) ;
if (long < 1)
{
form1.a.value='VALOR INPUT.VALUE DEL BOTONT ON CLICK'; <-- Esto es justo lo que no encuentro como hacer
}
else
{
form1.b.value='VALOR INPUT.VALUE DEL BOTONT ON CLICK';
}
}
</script>
</form>
</body>
</html>
Muchas gracias si por lo menos has leido el post.

