I have used the form of onclick that allows you to request the user to confirm or cancel an action - for example:
onclick=“return confirm(‘Are you sure you want to delete user?’)”
But now I want to block the action - for example, I have a button to take the user to another screen to purchase a product, but if the user isn’t logged in, I want to pop up a window that says ‘Sorry, you have to log in first’ and only allow the user to respond ‘OK’ which will leave the screen as it is - not go to the link.
Don’t forget to perform a logged-in check on the destination page, for when scripting isn’t being used, or for when someone has bookmarked that page, or if someone tries to get around your security, or … you get my drift.
Now, the problem with googling is that if you use the wrong names for something, you get nowhere fast. How many people look for a “footer that always stays at the bottom of the page” when they’d get way more hits googling for “sticky footer”?
We may have to take this discussion elsewhere. I agree though about the menu box. There’s no discoverability at all. The link needs to indicate in some way that it behaves differently. An icon beside of for a context list perhaps.