I have created an advanced filter for a datatylet. Now I want to add the selected option as the URL parameter. Therefore, every time an option is selected, the URL will change and if the page is reloaded then it will open for the selected filter based on the URL parameter.
Here's the one that I have so far ... help with any URL parameters will be appreciated.
Use the URL fragment to do this. In this way you can modify the URL in JavaScript without reloading the page. Then, when you refresh, then that piece is stuck with the URL.
Then, each time the dropdown value changes, set the value to the URL as follows:
window .location.hash = '#somevalue' < / Pre> Then, when the page loads:
$ (document) .ready (function () {// hash based on window.location.hash and its value Show / hide}
Comments
Post a Comment