$(document).ready(function() {
    StateWiseFlightSchool();
    $("#state_name").change(function(){
                
                //alert(state_name);
                //alert(SITE_URL);
                StateWiseFlightSchool();
                 
            });
        $(".fbo_name").change(function(){
                fbo_name = $(".fbo_name").val();
                 $("input[name='fbo_name']").attr('value',fbo_name);
            });


//            $('.multi').MultiFile();
});

function StateWiseFlightSchool()
{
    fbo_name = $("input[name='fbo_name']").val();
    state_name=$("#state_name").val();
    $.ajax({
             dataType:"json",
             type:"post",
             url:SITE_URL+"register/getStateWiseFlightSchool",
             data:"two_letter_stateName="+state_name,
             success:function(response)
             {
               $('#fbo_name').html('<option value="--select--">--select--</option> ');
                  $.each(response,function(i,v){
                    if(v.fbo_id==fbo_name)
                        $('#fbo_name').append('<option value="'+v.fbo_id+'" selected="selected">'+v.fbo_name+'</option> ');
                    else
                        $('#fbo_name').append('<option value="'+v.fbo_id+'">'+v.fbo_name+'</option> ');

                });


             }
         });
}

