this is my ajax code and im using Codeigniter framework, and im trying to send data to the controller
<script>
$('#mssgg').submit(function(){
var ms = $('#mess').val();
$.ajax({
type:'POST',
url:'http://localhost/index.php/C_Main_page/store_chat',
data:'messege'+ms,
error:function(data){
alert("error");
},
success:function(data){
alert("success");
}
});
});
</script>
i keep getting error, what did i do wrong??