jQuery Question

Why i don't get data after ajax posts requests?

Why i don't get data after

AJAX
posts requests ?

When i use

$('#fid1 input,select').attr('disabled','disbaled');


for disabling form input between ajax send post process

and use

$('#fid1 input,select').removeAttr('disabled');


for enabling form input after ajax send post success

index.php

<form method="post" id="fid1">
<input type="checkbox" id="check_box_one" name="color_check" value="one" onclick="sedn_ajax()">1<br>
<input type="checkbox" id="check_box_two" name="color_check" value="two" onclick="sedn_ajax()">2<br>
</form>

<script>
function sedn_ajax(){
$('#fid1 input,select').attr('disabled','disbaled');
$('#demoajax').hide();
$('#loading').show();
$.ajax({
url: 'test.php',
type: 'POST',
data: $('#fid1').serialize(),
success: function(data){
$("#loading").fadeOut("slow");
$('#demoajax').show();
$('#demoajax').html(data);
$('#fid1 input,select').removeAttr('disabled');
}
});
return false;
}
$(document).ready(sedn_ajax());
</script>


test.php

<?PHP echo $_POST['color_check']; ?>

Answer

You have multiple issues

function sedn_ajax(){
    $('#fid1 input,select').attr('disabled','disbaled');  //spelled disbaled wrong - lucky it is truthy. You also are slecting all selects in the page, not just the elements in the form. 
    $('#demoajax').hide();
    $('#loading').show();
    $.ajax({
        url: 'test.php',
        type: 'POST',
        data: $('#fid1').serialize(),  //serialize does not read disabled inputs
        success: function(data){
            $("#loading").fadeOut("slow");
            $('#demoajax').show();
            $('#demoajax').html(data);
            $('#fid1 input,select').removeAttr('disabled');
            }
        });
    return false;
}
$(document).ready(sedn_ajax());  //WRONG should not be ()

with the changes

function sedn_ajax(){
    var data = $('#fid1').serialize(); //read the form values before disabled
    $("#fid1").find('input,select').prop('disabled', true);  //set it to true and use prop, not attr
    $('#demoajax').hide();
    $('#loading').show();
    $.ajax({
        url: 'test.php',
        type: 'POST',
        data: data,  //use the variable
        success: function(data){
            $("#loading").fadeOut("slow");
            $('#demoajax').show();
            $('#demoajax').html(data);
            $("#fid1").find('input,select').prop('disabled', false);   //set it to false and use prop()
            }
        });
    return false;
}
$(document).ready(sedn_ajax);  //No ()

And how can it be improved, store look-ups into variables and do not keep looking up the elements in the DOM.