Jump to content

Filters reset to defaults


tyv

Recommended Posts

Hi, I have a bug on my website that I'm trying to fix. I have filters (drop down menus and click-calendar date range) that narrow down searches on my website by pulling out the information from the database. Problem is as follows: 1) I select my filters, the database choices are narrowed. 2) I get multiple pages (a filtered list from the database). 3) I click to go to the second page. 4) The filters reset to their defaults and I end up with the entire database again. I cannot view the second page (or any other page) of the filtered list. Only the first page. I am working on ASP files, Javascript and some html. My database is managed with sql. Any suggestions on how I can fix this? Any example scripts? Thanks for any help you can offer! tyv

Link to comment
Share on other sites

1) I select my filters, the database choices are narrowed. 2) I get multiple pages (a filtered list from the database). 3) I click to go to the second page. 4) The filters reset to their defaults and I end up with the entire database again.
You need to maintain some kind of context for the user's current session, and refer to it when the page loads, so that you can set the filters correctly for the current state. Assuming this is classic ASP, you should probably use ASP session variables for this. (If it's ASP.NET there are other ways such as viewstate and controlstate which you should look into.)
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...