jQuery(document).on("change", "#set_registration_fee_amount_form #adm_class, #set_registration_fee_amount_form #gender, #set_registration_fee_amount_form #adm_term, #set_registration_fee_amount_form #cat", function(){
	if($("#adm_term").val() != "" && $("#adm_class").val() != "" && $("#cat").val() != "") {
		$("#set_registration_fee_amount_form #amount").attr("disabled", true).val("Please Wait...");
		$("#set_registration_fee_amount_form .submit").attr("disabled", true);
		$.ajax({
			type: 'POST',
		    url: "contents/plugins/admission/ajax.php",
		    data: {action: "get_registration_fee", "adm_term": $("#set_registration_fee_amount_form #adm_term").val(), "gender": $("#set_registration_fee_amount_form #gender").val(), "adm_class": $("#set_registration_fee_amount_form #adm_class").val(), "cat": $("#set_registration_fee_amount_form #cat").val()},
		    success: function(data) {
		    	data = JSON.parse(data);
		    	if(data.error == 1) {

		    	} else if(data.error == 0) {
		    		$(".submit").attr("disabled", false);
		    		$("#amount").val(data.registration_fee).attr("disabled", false);
		    	}
		    },
		    error: function(xhr, status, error) {

		    }
		})
	}
})