Hi folks,
often I find myself suprized about simple things, I'm not sure but I believe that this might be one of them.
Often I find myself needing to merge get attributes, especially within filters and search pages within sites. This come be at times quite complicated, as you might want to remove and add parameters dynamically.
Simple way to do it is to use a form, but this get complicated, when adding elements that don't belong within a form. e.g. pagination
For example I might have a URL such as the following
http://www.example.org/ninja_search/?speed__gt=5&night_sight=1&page=1
How would I merge such URL with page=2, substituting the 1 with the new value? Is javascript the only option?
?speed__gt=5&night_sight=1&page=1 + page=2 = ?speed__gt=5&night_sight=1&page=2
Thanks :)