Como puedo requear valores:
debe nunca debe ser mayor a
dice; si asi fuese mostrar mensaje de alerta....
Código HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
<style type="text/css">
<!--
input{
color: #006699;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 11px;
font-stretch: normal;
font-style: normal;
font-variant: normal;
font-weight: bold;
letter-spacing: normal;
line-height: normal;
text-decoration: none;
text-transform: none;
}
-->
</style>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<table width="100%" border="1" cellspacing="0" cellpadding="2">
<tr>
<td width=10% align=center>Codigo</td>
<td width=40% align=center>Descripcion</td>
<td width=10% align=center>Pedido</td>
<td width=10% align=center>Aprobado</td>
<td width=30% align=center>Observacion</td>
</tr>
<!-- Cada <tr> se itera de acuedo a dostos que obtengo externamente, podria ser 1 tr o 100 tr y cada una con la variable de mismo nombre -->
<tr>
<td width=10% align=center>0001</td>
<td width=40% align=lef>AAAAAAAAAAAAAAAAAAAAAA</td>
<td width=10% align=center><input type="text" name="dice" readonly="readonly" value="4" size=6 maxlength=4 /></td>
<td width=10% align=center><input type="text" name="debe" size=6 maxlength=4 /></td>
<td width=30% align=left><input name="observa" type="text" size="30" maxlength="30" /></td>
</tr>
<tr>
<td width=10% align=center>0002</td>
<td width=40% align=left>BBBBBBBBBBBBBBBBBBBBBBBB</td>
<td width=10% align=center><input name="dice" readonly="readonly" type=text value="10" size=6 maxlength=4/></td>
<td width=10% align=center><input type="text" name="debe" size=6 maxlength=4/></td>
<td width=30% align=left><input name="observa" type="text" size="30" maxlength="30" /></td>
</tr>
<tr>
<td width=10% align=center>0003</td>
<td width=40% align=left>CCCCCCCCCCCCCCCCCCCCCC</td>
<td width=10% align=center><input name="dice" readonly="readonly" type=text value="8" size=6 maxlength=4/></td>
<td width=10% align=center><input type="text" name="debe" size=6 maxlength=4 /></td>
<td width=30% align=left><input name="observa" type="text" size="30" maxlength="30" /></td>
</tr>
</table>
</form>
</body>
</html>