Posted By

nickaranz on 05/28/11


Tagged

forms Development sharepoint 2010


Versions (?)

Getting Query String Parameters from URL


 / Published in: JavaScript
 

  1. function getQSP()
  2. {
  3. var qs = location.search.substring(1, location.search.length);
  4. var args = qs.split("&");
  5. var vals= [];
  6. for (var i=0; i < args.length; i++)
  7. {
  8. var nameVal = args[i].split("=");
  9. var temp = unescape(nameVal[1]).split('+');
  10. nameVal[1] = temp.join(' ');
  11. vals[nameVal[0]] = nameVal[1];
  12. }
  13. return vals;
  14. }

Report this snippet  

You need to login to post a comment.