Hi guys,
I am getting very weird issue here. On my wampserver, this script works fine but not on my liver server which is linux. This is what it does. After a checkbox gets checked, the scripts identifies that and insert a row in table and that script send back a notification saying "new row entered". On my local wamp, it works fine but on the live server, it is able track my checkbox checking, it inserts the record too but, the checkbox doesn't it is being checked. below is the jQuery for it.
<script type="text/javascript">
/* adding category on each click*/
$('#post_cat_id2').click(function() {
if($(this).prop('checked') == true)
{
var form_data = {
post_cat_id: $('#post_cat_id2').val(),
action: 'add'
};
$.ajax({
url: "http://localhost/MIS_ServerCopy/index.php/posts/ajax_set_categorytopost",
type: 'POST',
data: form_data,
success: function(msg){
$('#Postsnotifications').hide().html(msg).fadeIn('slow'); //appending newly added categories, in
$('#post_cat_id2').prop('checked', 'checked');
}
});
}
else
{
var form_data = {
post_cat_id: $('#post_cat_id2').val(),
action: 'add'
};
$.ajax({
url: "http://localhost/MIS_ServerCopy/index.php/posts/ajax_set_categorytopost",
type: 'POST',
data: form_data,
success: function(msg){
$('#Postsnotifications').hide().html(msg).fadeIn('slow'); //appending newly added categories, in
$('#post_cat_id2').prop('checked', false);
}
});
}
return false;
});
</script>