I can't seem to figure out why this isn't working. request.php is
working just fine.
$(document).ready(function(){
$("input.search").keypress(function(){
$("select.make").removeAttr('disabled');
$("button.search").removeAttr('disabled');
});
$("select.make").each(function(i){
$(this).change(function(){
if($(this).val() > 0) {
$.ajax({
type: "POST",
url: "/request.php",
data: "action=model_list&make_id=" +
$(this).val(),
dataType: "json",
success: function(json) {
$("select.model")[i].empty();
for(ii in json) {
$("select.model")[i].append('' + json[ii]['name'] + '');
}
},
error: function(object, msg) {
alert(msg);
},
complete: function() {
$("select.model")[i].removeAttr('disabled');
}
});
}
});
});
});
I get an alert box with "error"...