I am trying to pull the variable cid out of the querystring in JQuery Mobile beta 3.
Example of Normal URL would be /category.php?cid=23
Example of JQuery Mobile URL /#/category.php?cid=23
I can pull the variable out of the querystring normally with the function below in most browsers, because of JQuery Mobile Beta 3's url rewriting. However IE does not support the new browser history functions. https://developer.mozilla.org/en/DOM/Manipulating_the_browser_history
Therefore I need a way to pull out the querystring from JQuery Mobile Url seen above and the following function I normally use below does not work properly for that.
function getQuerystring(key) {
var re=new RegExp('(?:\\?|&)'+key+'=(.*?)(?=&|$)','gi');
var r=[], m;
while ((m=re.exec(document.location.search)) != null) r.push(m[1]);
return r;
}
I am either looking for an alternative regex that could find the hashed variable in browsers that don't support history.pushState or some other solution entirely. I've searched in the documentation for a solution to this problem, but haven't found anything. I would think this would be a problem that would have been thought out and solved already by the JQuery Mobile Team, I am probably just missing something pretty obvious. Thanks in advance for any help.