Ver Mensaje Individual
  #1 (permalink)  
Antiguo 18/10/2010, 14:55
annis
 
Fecha de Ingreso: junio-2008
Mensajes: 8
Antigüedad: 15 años, 10 meses
Puntos: 0
desactivar un input

hola! espero me puedan ayudar :)

estoy trabajando en una esquema de calificaiones de alumnos.
Lo que quiero hacer es que cuando se ingrese el porcentaje de asistencia si este es menor que 80 los campos para ingresar las calificaciones se inhabiliten. Coloco una la parte del codigo donde listo para generar las calificaciones ..

<?

if( isset($_SESSION['Alumnos']) )
unset($_SESSION['Alumnos']);
if( isset($_GET['gpoMat']) && $uniGet ) :
$gpo = $_SESSION['grupoID'];
$mat = $_SESSION['materiaID'];
$per = $_SESSION['periodoID'];
$par = $_SESSION['parcialID'];
$strSQL = "exec sp_selectAlumnosByParams '$gpo','$mat','$per','$par',$uniGet";
$res = @mssql_query( $strSQL ) or die ( $strDie );
if( mssql_num_rows($res)>0) :
//$cont = 1;
$index = 0;
$style1 = "style='font-size:11px'";
$style2 = "style='font-size:11px;text-align:center;background-color:white;color:blue;border:1px solid black;width:35px;font-weight:bolder'";
$style3 = "style='font-size:12px;text-align:center;font-weight:bolder;background-color:white;color:black;border:1px solid black;width:35px'";
$onFocusOut = "alert(this.form.)";
$_SESSION['Alumnos'] = array();
while( list($matricula,$nombre,$asis,$sab,$hac,$ser,$prom )=mssql_fetch_array($res) ) :
$box = "-$matricula";
$onFocusOut = "this.value";
$_SESSION['Alumnos'][$index] = $matricula;
$style4 = (($index+1)%2 == 0) ? 'style="background-color:#CBDD93"' : null;
echo "<tr $style4>";
echo "<td $style1 align=center>".++$index."</td>";
echo "<td $style1 align=center>$matricula</td>";
echo "<td $style1 align=left>$nombre</td>";
echo "<td align=center><input type=text id='asi$box' name='asi$box' value='".($asis?$asis:0)."' size=3 maxlength=3 $style2 onfocusout='valAsistencia(this.name,this)' onKeyPress='checkKey1(); ' ></td>";
echo "<td align=center><input type=text id='sab$box' name='sab$box' value='".($sab?$sab:0)."' size=3 maxlength=3 $style2 onfocusout='valCalificacion(this.name,this)' onKeyPress='checkKey2();'></td>";
echo "<td align=center><input type=text id='hac$box' name='hac$box' value='".($hac?$hac:0)."' size=3 maxlength=3 $style2 onfocusout='valCalificacion(this.name,this)' onKeyPress='checkKey2();'></td>";
echo "<td align=center><input type=text id='uni$box' name='uni$box' value='".($prom?$prom:0)."' size=3 maxlength=3 $style3 onChange='alert(0)' readonly></td>";

echo "</tr>";
endwhile;
endif;
@mssql_free_result($res);
mssql_close($cnn);
else:
echo "<tr><td align=center colspan=8 style='color: navy'>Debe elejir el grupo/materia y la unidad que va a calificar.</td></tr>";
unset($_SESSION['grupoID']);
unset($_SESSION['materiaID']);
endif;
?>