Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • Just to know... what do you expect a "replace" function is supposed to do?? Commented Feb 21, 2017 at 21:56
  • Check out this question: stackoverflow.com/questions/5999118/… Commented Feb 24, 2017 at 7:19
  • in a case like this you need to check, your old query parameter, new query parameter and new query parameter value, if they are empty or invalid (e.g. wrong old query parameter). Also you need to check if current url has query parameters at all. Mostly these are the checks that need to be done in your add or replace query parameter function Commented Feb 28, 2017 at 10:15