Somehow window.location.hash is being handled differently in different browsers. If I have a url as follows
http://maps-demo.bytecraft.com.my/postdemo/parcel
You could just use window.location.href
instead of hash but why not use regex? More reliable and future-safe than a method based on substringing from character N. Try:
window.location.href.match(/#parcel\/history\/(.*?)(\?|$)/)[1]
Regex isn't the right answer all the time, but sometimes it's just right.
Edit: cleaned up method encapsulation
function GetValue()
{
var m = window.location.href.match(/#parcel\/history\/(.*?)(\?|$)/);
return m ? m[1] : null;
}