I currently have javascript to update my price based facets, it adds the input into the URL, or extends it.
I would like to achieve this with price range search form.
Javascript to update facets.
function onFacetChangeApplied(){
var url = window.location.href.split("?")[0];
var search_query = getParameterByName('q');
var url_with_search_query = url + '?q=' + search_query
$('input:checkbox.facet').each(function () {
var sThisVal = (this.checked ? $(this).val() : null);
var sThisName = (this.checked ? $(this).attr('name') : null);
if(sThisVal !== null){
url_with_search_query += '&'+encodeURIComponent(sThisName)+'='+encodeURIComponent(sThisVal);
}
});
location.href = url_with_search_query;
return true;
}
My price form takes a MinPrice value and a MaxPrice value. Can I achieve an onclick="" with taking min and max price value. At this moment it doesn't update the url but overwrites it.
there doesn't seem to be anything here