You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's probably a simpler way to achieve the filtering: your client-side JS currently fetches an HTML response, then replaces the entire content of the page with that HTML response.
This is essentially what an anchor tag does by default: when the user clicks it the browser sends a GET request to the URL in the href property, and then shows the HTML response as a new page.
So if you give your filter links hrefs like <a href="/filter?f=work"> etc then you could access that querystring value in the handler for the /filter endpoint and send the right response. You wouldn't need any client-side JS at all
The text was updated successfully, but these errors were encountered:
There's probably a simpler way to achieve the filtering: your client-side JS currently fetches an HTML response, then replaces the entire content of the page with that HTML response.
This is essentially what an anchor tag does by default: when the user clicks it the browser sends a
GET
request to the URL in thehref
property, and then shows the HTML response as a new page.So if you give your filter links
href
s like<a href="/filter?f=work">
etc then you could access that querystring value in the handler for the/filter
endpoint and send the right response. You wouldn't need any client-side JS at allThe text was updated successfully, but these errors were encountered: