url - Javascript Reload page with change in param values when params are in no particular order -


After updating the parameter values ​​I need to reload the page location, if paramomas were always in it then it is difficult There is a special order, but they are not.

So if there was a fixed pattern, then I could target them through a regex match, for example URL:

I was targeting it like this:

window.location.replace (window.location.href.replace (sf_id = \ d + & amp; d + \. Survey = form and variation =, 'sf_id = 460 & Amp; 460.survey = form and variety = 25002_2 '));

But now the ultimate event is random, so these are all valid URLs:

  http: //www.example.html? 15041.survey = form & amp; Sf_id = 15040 & amp; Variation = 25002_1 http: //www.example.html? Variation = 25002_1 & amp; Sf_id = 15040 and 15041.survey = form http: //www.example.html? Param1 = value1 and variation = 25002_1 & amp; Sf_id = 15040 and param2 = value2 and 15041.survey = form  

I know that if I give more statements, but I do not think correctly, then there is no specific pattern. / P>

Any help is appreciated! Thank you.

See, you will proceed to the track. After this you can compare different object-to-objects so that it can check whether they are a match.


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -