It is not as simple as you mention. I think you didn't understand my scenario.
My page have link in header and LHS(left hand side). which used to navigate other views. But in current view I have huge form, so if by mistakenly user click link in header or LHS then I should avoid him to navigate to source view.
One more point LHS and Header link are in different view which never change. It change middle content of page.
I have to handle it in global event as Martin mention. But its not working.
what your sample do is in current view if I have any link or button which will work. but that is not a case.