function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ganesh HegdeGanesh Hegde 

Filter is getting cleared after Page refresh - JQuery

Hi,

I am using JQuery to filter the values using multiselect function. the multiselect filter works fine but if i refresh the page the filter gets cleared and it displayes all values

var val = j$('#class1').val();
var value;

if (document.getElementById('a1').selected ){
   search = search.concat(document.getElementById('aa').value);
}
if (document.getElementById('a2').selected){
         if (search.length > 1){
             search = search.concat("|");
         } 
        search = search.concat(document.getElementById('a2').value); 
      }  
                 
      if (val == null) {
        oTable.fnFilter(' ', 18, false);
     } 
     else {
        oTable.fnFilter(search,18,true,false);
    }
    setCookie(prodpage, search);
    }


j$(document).ready(function(){
  j$("#class1").multiselect();
  
});

Please let me know if I need to set any values related to browser refresh to hold the filter values even after refresh. Please help/suggest.

Thanks a lot,
Ganesh
Ganesh HegdeGanesh Hegde
Hi,

Anybody faced this issue? I am not resetting the cookie as well. Still filter value is getting cleared.

Thanks