Maybye someone can help me. I have a search engine that shows results from json. I'm doing pagination for these results. I have the search results in json value: "query": "offset = 10 & hits = 10 & q = aaa". After clicking on the next page in pagination I would like to add the query result to url 'https://xyz' and change the value 'q' to 'query'. I would like to get result like this:https://xyz?offset=10&hits=10&query=aaa
Asked
Active
Viewed 23 times
0
-
1Please edit your post with a clear snippet of your code. – Daniel Mar 03 '18 at 19:12
1 Answers
0
You can change the url using location.href in JavaScript, but it will reload the page entirely so if you want to maintain scroll position you might add a query parameter for that as well.

Jtbs
- 181
- 9