Util.getQueryParam now replaces the getQueryParam plug-in.

Just like the getQueryParam plug-in, this utility helps in capturing data sent in the query string.

 

However, it differs from its counterpart in several ways :

1.) s.getQueryParam plugin supported multiple URL parameters, but it is not possible to fetch multiple parameters using Util.getQueryParam at the same time.

To fetch multiple parameters using Util.getQueryParam, we need to implement this as many times as required.
For example:
-> //multiple parameters using s.getQueryParam
s.campaign=s.getQueryParam('cid,sid',':');

-> //multiple parameters using s.Util.getQueryParam
s.campaign = s.Util.getQueryParam("cid");
s.campaign = s.Util.getQueryParam("sid");

2.) Util.getQueryParam is case-sensitive unlike the previous s.getQueryParam plugin.

3.) Util.getQueryParam is faster and lighter than its counterpart.


Note: getQueryParam plugin is not compatible with the new version of JS. So you will need to ensure you replace the plugin with the utility.getQueryParam plug-in.

 

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy