Código PHP:
Ver original<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="javascript" type="text/javascript">
function getXMLHTTP()
{
var xmlhttp=false;
try
{
xmlhttp=new XMLHttpRequest();
}
catch(e)
{
try
{
xmlhttp= new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e)
{
try
{
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e1)
{
xmlhttp=false;
}
}
}
return xmlhttp;
}
function getState(countryId)
{
var strURL="findState.php?country="+countryId;
var req = getXMLHTTP();
if (req)
{
req.onreadystatechange = function()
{
if (req.readyState == 4)
{
if (req.status == 200)
{
document.getElementById('statediv').innerHTML=req.responseText;
}
else
{
alert("There was a problem while using XMLHTTP:\n" + req.statusText);
}
}
}
req.open("GET", strURL, true);
req.send(null);
}
}
function getCity(countryId,stateId)
{
var strURL="findCity.php?country="+countryId+"&state="+stateId;
var req = getXMLHTTP();
if (req)
{
req.onreadystatechange = function()
{
if (req.readyState == 4)
{
if (req.status == 200)
{
document.getElementById('citydiv').innerHTML=req.responseText;
}
else
{
alert("There was a problem while using XMLHTTP:\n" + req.statusText);
}
}
}
req.open("GET", strURL, true);
req.send(null);
}
}
</script>
</head>
<body>
<form action="asistencias_calificaciones.php" method="post">
<img align="right" src="logo proyecto.jpg" width="500" height="200">
<?php
include_once ("clase.php");
$finicio="";
$estado="";
$municipio="";
?>
<table width="378" height="219" border=4>
<tr>
<td width="150">Estado</td>
<td width="150"><select name="country" onChange="getState(this.value)">
<option value="">Selecciona Estado</option>
<?php
$estado=new Estados();
$estado= $estado->getEstado();
print '<option value='.$row['Id_Estados'].'>'.$row['Estado'].'</option>' ;
?> </select>
</td>
</tr>
<tr>
<td>Municipio</td>
<td ><div id="statediv"><select name="state">
<option>Selecciona estado primero</option>
</select></div>
</td>
</tr>
<tr>
<td>Fecha de Inicio</td>
<td ><div id="citydiv"><select name="city">
<option>Seleccciona municipio primero</option>
</select></div>
</td>
</tr>
</table>
<br>
<input type="submit" name="MOSTRAR" value="MOSTRAR">
<?php
if($_POST['MOSTRAR']=='MOSTRAR')
{
$usuario=new Usuario();
$usuario= $usuario->getByDate($_POST['state'],$_POST['country'],$_POST['city']);
echo '<br/><br/><table border=4>'
.'<tr><td>Nombre</td>'
.'<td>s1</td>'
.'<td>d2</td>'
.'<td>s3</td>'
.'<td>d4</td>'
.'<td>s5</td>'
.'<td>Total Asistencias</td>'
.'<td>U 1</td>'
.'<td>U 2</td>'
.'<td>U 3</td>'
.'<td>U 4</td>'
.'<td>U 5</td>'
.'<td>U 5</td>'
.'<td>Promedio Final</td></tr>';
{
print '<tr>'
.'<td>'.$row['Nombre']." ".$row['A_Paterno']." ".$row['A_Materno'] .'</td>'
.'<td>'.'<input type="checkbox" name="s1" />'.'</td>'
.'<td>'.'<input type="checkbox" name="d1" />'.'</td>'
.'<td>'.'<input type="checkbox" name="s2" />'.'</td>'
.'<td>'.'<input type="checkbox" name="d2" />'.'</td>'
.'<td>'.'<input type="checkbox" name="s3" />'.'</td>'
.'<td>'.'<input name="asistencias" type="text" size="10" />'.'</td>'
.'<td>'.'<input name="calif1" type="text" size="6" />'.'</td>'
.'<td>'.'<input name="calif2" type="text" size="6" />'.'</td>'
.'<td>'.'<input name="calif3" type="text" size="6" />'.'</td>'
.'<td>'.'<input name="calif4" type="text" size="6" />'.'</td>'
.'<td>'.'<input name="calif5" type="text" size="6" />'.'</td>'
.'<td>'.'<input name="calif6" type="text" size="6" />'.'</td>'
.'<td>'.'<input name="promedio" type="text" id="textfield" size="10" />'.'</td>'
.'</tr>';
}
print '</table>';
}
?>
</form>
</body>
</html>
BUENO COMPAÑEROS, LA BRONCA ES ESTA:
QUIERO QUE EL BOTONO ''MOSTRAR'' HAGA SU FUNCION...MOSTRAR!!
PERO POR ALGUNA RAZON QUE NO HE VISTO O SE, NO LA PUEDO LLEVAR A CABO!
AYUDENME CAMARADAS, SI NECESITAN UN DATO SE LOS PROVEERE PARA SOLUCIONAR ESTE PROBLEMA.
GRACIAS!