Código PHP:
<script language="JavaScript">
function cambiaEstado(obj)
{
switch (obj.options[obj.selectedIndex].value)
{
case "Cuota":
document.cobroAporte.fechaInicio.disabled=false;
document.cobroAporte.fechaFin.disabled=false;
document.cobroAporte.cuotas.disabled=false;
document.cobroAporte.imgFI.disabled=false;
document.cobroAporte.imgFF.disabled=false;
break;
default:
document.cobroAporte.fechaInicio.disabled=true;
document.cobroAporte.fechaFin.disabled=true;
document.cobroAporte.cuotas.disabled=true;
document.cobroAporte.imgFI.disabled=true;
document.cobroAporte.imgFF.disabled=true;
document.cobroAporte.fechaInicio.value='';
document.cobroAporte.fechaFin.value='';
document.cobroAporte.cuotas.selectedIndex=0;
}
}
</script>
<form name='cobroAporte' method='POST' action='/sib2/cont/CobroAporte.php' runat="vdaemon" >
<table>
...
...
<td>
<select name="tipoCuota" size="1" class="inputText" onchange="cambiaEstado(this);" >
<option value='-1' >Click Aqui</option>
<option >Cuota</option>
<option >Matricula</option>
<option >Carnet</option>
</select>
</td>
<td>
<select name='cuotas' size='1' class='inputText' >
<option value='-1' >Click Aqui</option>
<option value='1' >Mensual normal</option>
<option value='2' >Extraordinaria</option>
<option value='3' >Matricula</option>
<option value='4' >Carnet</option>
</select>
</td>
<td>
<input type='text' name='fechaInicio' size="10" id="f_date_b" class="inputText">
<input type='text' class='calendarButton' name='imgFI' id="f_trigger_c"
style="cursor: pointer; border: 1px solid red;"
title="formato:(yyyy-mm-dd)" alt="(yyyy-mm-dd)"
onmouseout="this.style.background=''" />
<script type="text/javascript">
Calendar.setup({
inputField : "f_date_b", // id of the input field
ifFormat : "%d/%m/%Y", // format of the input field
button : "f_trigger_c", // trigger for the calendar (button ID)
singleClick : true, // double-click mode
step : 2 // show all years in drop-down boxes (instead of every other year as default)
});
</script>
</td>
...
...
</table>
</form>