Well, this time will be shortly as always. I wanted to get value from some param in URL. After some research this could be done by this code (I use it):

 * Function getValueFromURLparam
 * Extracting Querystring key/value pairs

var getValueFromURLparam = function(name, url)
	name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
	var regexS = "[\\?&]"+name+"=([^&#]*)";
	var regex = new RegExp( regexS );
	var results = regex.exec(url);
	return (results === null) ? "" : results[1];


You can leave a response, or trackback from your own site.

Before you add comment see for rules.

Leave a Reply

Your email address will not be published. Required fields are marked *