Hi friends,
I am using codeigniter framework and in view i am using jquery. Now, I have one select box which contains values from database. I tested the values of it using jquery change event and alert box. Its giving exact value in alert box on change, but when i am using post method or get or even $.ajax(), its not giving any output. In fact i checked with console.log(), its not going inside that too. I just need to post some values and get some info from database to show in the div just below that select box. Here's the code for jquery:
$(document).ready(function(){
$('#org_name').change(function(){
$.post('index.php/contact/getorg',{'query':$('#org_name').val()},function(data){
console.log("inside post");
$('#showorg').html(data);
console.log(org_name);
});//close post function
}); //close org_name event function
});
I appreciate your help in this. thanks