with #hash_id concatenated with url, document.getElementById(hash_id) cannot be traced onclick. But after refreshing it is working fine
for example,
http://myurl.com/#123 can not identify specific id using document.getElementById(hash_id). until refreshing again