[eluser]Richievc[/eluser]
This is for the Flexigrid system
Hi there first must say very nice indeed. My Question or should say problem is that I created a button to hide any line item that has been disable basic 0 disable 1 enabe this value is in Database is_active I use firebug to view the errors.
So everything seems to work, given the problem which is that the data stay the same all disabled users are still there after clicking the disable button.
Code:
if (com=='Hide Disabled') {
var items = $('.trSelected',grid);
var itemlist = '';
for(i=0;i<items.length;i++){
itemlist+= items[i].id.substr(3)+",";
}
$.ajax({
type: "POST",
url: "<?=site_url("/ajax/index/hide");?>",
data: "items=" + itemlist,
success: function(data){
$('#flex1').flexReload();
}
});
}
This code send the value hide to trigger the model to hide the uses
Code:
$hide = $this->uri->segment(3);
// Build contents query
if($hide=='hide') {
$this->db->from($table_name)->where('is_active',1);
} else {
$this->db->from($table_name);
}
$this->flexigrid->build_query();
The Problem seems to be that it's reloading with hide value, then reloading again back to the original value I can see two post in firebug the hide post then a regular post
Code:
url: "<?=site_url("/ajax/index/hide");?>", // first post which it should be
url: "<?=site_url("/ajax/index/");?>", // then back to this one which should not happen
any ideas would help greatly thanks
Thanks