I recently learned the hard way that
# but make sure your
onclick event returns
<a href="#" onclick="aFunction();return false;">Link</a>
d’bug has a great writeup on why this works and the other doesn’t.