Jump to content

Filters reset to defaults


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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...