El problema principal es que button() no existe en jQuery (y si existe ni se para que sirve)
vos lo que necesitás es enviar el form con esa acción.
Te limpié un poco el html, pone todo tu javascript al final (queda muy desprolijo meterlo o dentro del div ó en las filas de la tabla, y el
$(document).ready(function()
sólo es necesario hacerlo una vez y dentro de el tus funciones
Código HTML:
Ver original<!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"> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> <div id="newaircraftdialog" title="New Aircraft"> <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>
<tr><td></td><td><input id="insertaircraft" type="submit" value="Insert Aircraft"/></td></tr>
</table>
</form>
</div>
<script type="text/javascript">
$(document).ready(function() {
$("#insertaircraft").click(function(event) {
event.preventDefault(); // si envías con ajax desde un botón submit
alert('enviar x ajax');
});
$("#numberclasses").change(function() {
value = $(this).val();
str = parseInt(value);
switch(str){
case 0:
$("#firstclassseats").attr("disabled","disabled");
$("#businessclassseats").attr("disabled","disabled");
$("#economyclassseats").attr("disabled","disabled");
break;
case 1:
$("#economyclassseats").removeAttr('disabled');
$("#firstclassseats").attr("disabled","disabled");
$("#businessclassseats").attr("disabled","disabled");
break;
case 2:
$("#businessclassseats").removeAttr('disabled');
$("#economyclassseats").removeAttr('disabled');
$("#firstclassseats").attr("disabled","disabled");
break;
case 3:
$("#firstclassseats").removeAttr('disabled');
$("#businessclassseats").removeAttr('disabled');
$("#economyclassseats").removeAttr('disabled');
break;
}
});
});
Primero probalo en forma individual y después en lugar del alert usás $ajax ó $post de jQuery
SAludos