Cita:
Iniciado por emprear Como te dije , posteá el html generado completo
Saludos
Te explico, te pongo el HTML generado del DIV ya que si pongo el completo es demasiado. Ya que en el index.php también hay una tabla. Si necesitas más código pídelo:
Código HTML:
Ver original<div id="newaircraftdialog" title="New Aircraft"> $(function() {
$("#insertaircraft")
.button()
.click(function(event) {
});
});
<form action="new_aircraft_process.php" method="post" enctype="application/x-www-form-urlencoded">
<tr><td class="forms">ICAO:
</td><td><input maxlength="4" type="text" name="icao" size="30"/></td></tr>
<tr><td class="forms">Name:
</td><td><input type="text" name="name" size="30"/></td></tr>
<tr><td class="forms">Weight Empty:
</td><td><input type="text" name="weightempty" size="30"/></td></tr>
<tr><td class="forms">Weight Full:
</td><td><input type="text" name="weightfull" size="30"/></td></tr>
<tr><td class="forms">Cargo Full:
</td><td><input type="text" name="cargofull" size="30"/></td></tr>
<tr><td class="forms">Cruise Speed:
</td><td><input type="text" name="cruisespeed" size="30"/></td></tr>
<tr><td class="forms">Range:
</td><td><input type="text" name="range" size="30"/></td></tr>
<tr><td class="forms">Price:
</td><td><input type="text" name="price" size="30"/></td></tr>
<tr><td class="forms">Number Classes:
</td><td><select id="numberclasses" name="numberclasses"> <option value="1">One Classes (Economy)
</option>option value="2">Two Classes (Business
& Economy)</option><option value="3">Three Classes (First, Business & Economy)</option> </select></td></tr>
<tr><td class="forms">First Class Seats:</td><td><input disabled="disabled" type="text" id="firstclassseats" name="firstclassseats" size="30"/></td></tr>
<tr><td class="forms">Business Class Seats:</td><td><input disabled="disabled" type="text" id="businessclassseats" name="businessclassseats" size="30"/></td></tr>
<tr><td class="forms">Economy Class Seats:</td><td><input disabled="disabled" type="text" id="economyclassseats" name="economyclassseats" size="30"/></td></tr>
<script>
$("#numberclasses").change(function() {
value = $(this).val();
str = parseInt(value);
switch(str)
{
case 0:
$(document).ready(function() {
$("#firstclassseats").attr("disabled","disabled");
$("#businessclassseats").attr("disabled","disabled");
$("#economyclassseats").attr("disabled","disabled");
});
break;
case 1:
$(document).ready(function() {
$("#economyclassseats").removeAttr('disabled');
$("#firstclassseats").attr("disabled","disabled");
$("#businessclassseats").attr("disabled","disabled");
});
break;
case 2:
$(document).ready(function() {
$("#businessclassseats").removeAttr('disabled');
$("#economyclassseats").removeAttr('disabled');
$("#firstclassseats").attr("disabled","disabled");
});
break;
case 3:
$(document).ready(function() {
$("#firstclassseats").removeAttr('disabled');
$("#businessclassseats").removeAttr('disabled');
$("#economyclassseats").removeAttr('disabled');
});
break;
}
});
<tr><td></td><td><input id="insertaircraft" type="submit" value="Insert Aircraft"/></td></tr>