Gracias
Estos son los códigos:
Código:
<script language="JavaScript">
function noVacio()
{
var i;
var n = parseInt(document.frm.cantidad.value);
var bError = false;
for (i = 0; i < n; i++)
{
bError = bError || (eval("document.frm.elemento" + i + ".value == ''"));
if (bError)
{
alert("Debe de introducir el asunto.");
eval("document.frm.elemento" + i + ".focus()");
break;
}
break;
}
}
</script>
Código:
<form action="grabaragenda.asp" method="post" name="frm"> <b>Asunto:</b> <br /> <input type="text" size="49" name="elemento0" /> <br /> <br /> <b>Comentarios Iniciales:</b> <br /> <textarea cols="37" rows="2" name="elemento1"></textarea><br /> <input type="hidden" name="cantidad" value="1"> <input type="submit" name="BtnEntrar" id="BtnEntrar" value="Agendar" class="botonp" onclick="noVacio()"/>


