I have in the page that lists the properties of my site a search form and a select that does the ordering of the result.
Theproblem:Searchingtheformandpassingintheurlthevaluesviagetctr=0&min=20000&max=999999&suites=3etc.andsoonafterchoosingasortoptiontheurlhaslostthesevaluesbecausethepageisupdatedandsortstheoverallresult.WhenIselectasortoption,IwanttosorttheresultthatappearsonthepageandsoIneedtokeepthepreviousfilterparameterintheurlandaddthesortparameter.
I'msendingtheactiontosortthiswayandsoIlosethevaluesthatareintheurl:
$("select.ordenacao").change(function() {
$("select.ordenacao").each(function() {
str = $( this ).val();
//alert(str);
//$("#ordenar").submit();
location.href = '?ordenacao=' + str;
});
});
Does anyone have any suggestions?