While debugging I got this error in my below part of code..
queryStirngValue = document.referrer.split("myQuryString")[1].split("%")[1].split("253D")[1];
alert(queryStirngValue);
While debugging I got this error in my below part of code..
queryStirngValue = document.referrer.split("myQuryString")[1].split("%")[1].split("253D")[1];
alert(queryStirngValue);
document.referrer.split("myQuryString")[1].split("%")
You first split on myQuryString (which by itself is misspelled?)
With [1] you then want the second array value (because arrays start at 0)
So if myQuryString is not in the QueryString you now have a null value
So
null.split("%")
causes: Uncaught TypeError: Cannot read property 'split' of undefined(…)