You need to sign in to do that
Don't have an account?

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
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
Anybody faced this issue? I am not resetting the cookie as well. Still filter value is getting cleared.
Thanks