function ask(){
var question = $('#question').val();
$('input[type="checkbox"][name="anonym"]').change(function(){
if(this.checked){
var anonym = '1';
}else{
var anonym = '0';
}
});
$.ajax({
type: 'POST',
url: 'action.php?do=action&action=ask',
data: 'user=$id&question='+question+'anonym='+anonym,
scriptCharset: 'utf8',
success: function(html){
$('.question-box').empty();
$('.question-box').append(html);
}
});
}