I want a link that submits some POST data. This works:
<a href="#" onclick="document.forms[0].foo = 42; document.forms[0].submit(); return false">Bar</a>
However, if I middle-click (Google Chrome: open link in new tab) on links that are formed like that, the page doesn't open in a new tab; rather, the link gets followed in the current tab. This isn't nice and it's unexpected behavior to boot (one expects middle-clicking would work on this link just like on any other).
How do I make this link act more like an actual link, particularly, by making this middle-click behavior work as usual?