I inspected the inbox link in hotmail using firebug and saw something like that:
<a ... href="javascript:; .... />
I just can’t figure out how the postback is realizing when I click the link. And what does “javascript:;” mean while it doesn’t refer to any function?
The
javascript:part there is a pseudo-protocol meaning that the URI should be interpreted as JavaScript code. The;immediately after it is a statement terminator. Assuming that nothing else follows, it basically makes the link do nothing when clicked.If something is happening when the link is clicked, I’m guessing a
clickevent handler has been attached to it or one of its ancestor elements.clickbubbles up the DOM, so you don’t have to watch it actually on the element itself.You won’t necessarily see those event handler attachments in the HTML; the page may well use unobtrusive techniques to hook up the handler later.
Gratuitous live example #1 (hooking the
clickon the link unobtrusively)Gratuitous live example #2 (hooking the
clickon an ancestor element)