$(document).ready(function(){
	
$("select[name=answer]").change(function(){
	$("#captchaResponse").text('')
	var id = $(this).attr('id');
	var answer = $(this).val();
    $.ajax(
    	    {
    	      type: "POST",       
    	      url: 'home/check_captcha',
    	      data: "id=" +id+ "&answer=" +answer,
    	          success: function(response){
    	            if(response != "true"){          
    	                $("#captchaResponse").text(response).css('color','red');
    	            }
    	       }
    	    }
    	  );				
	});
		
});
