'); var action = 'fetch_data'; var page = $('#page').val(); var start = $('#start').val(); var minimum_price = $('#hidden_minimum_price').val(); var maximum_price = $('#hidden_maximum_price').val(); var pc = document.getElementsByName('pc'); var itemname = $('#itemname').val(); var myform = document.getElementById("filterSubmit"); var fd = new FormData(myform ); fd.append('minPrice',minimum_price); fd.append('maxPrice',maximum_price); fd.append('page',page); fd.append('start',start); fd.append('category',$('#category').val()); fd.append('companyid',$('#companyid').val()); fd.append('branchid',$('#branchid').val()); fd.append('urisegment1',$('#urisegment1').val()); fd.append('urisegment2',$('#urisegment2').val()); fd.append('urisegment3',$('#urisegment3').val()); if(itemname !== undefined){ fd.append('itemname',$('#itemname').val()); } // console.log(fd); var brand = get_filter('brand'); var ram = get_filter('ram'); var storage = get_filter('storage'); var category = $('#category').val(); // {action:action, minimum_price:minimum_price, maximum_price:maximum_price, brand:brand, ram:ram, storage:storage,category:category} $.ajax({ url:"http://samadhancity.com/Category/show_filter_brands_data", //method:"POST", data:fd, cache: false, processData: false, contentType: false, type: 'POST', success:function(data){ if(data == '') { $('#load_more').html('No More Result'); } $('#dataFilter').append(data); $('#display_brand_data').hide(); $('#start').val(page); var count = parseInt(page)+15; //alert(count); $('#page').val(count); // var maxpriceByDyn = $('.maxpriceByScript').val(); // if(maxpriceByDyn != undefined){ // var maximum_price = $('#hidden_maximum_price').val(maxpriceByDyn); // $('#price_show').html('0 - '+maxpriceByDyn+'') // } $('.filter_data').html(''); } }); } function get_filter(class_name) { var filter = []; $('.'+class_name+':checked').each(function(){ filter.push($(this).val()); }); return filter; } // $(document).ready(function(){ // var maxprice = $('.maxprice').val(); // var maximum_price = $('#hidden_maximum_price').val(); // if(maxprice !=''){ // var maximum_price = $('#hidden_maximum_price').val(maxprice); // console.log(maxprice); // } // console.log(maximum_price); // });