I think the root of this problem is that clicking on a link (an <A> tag) will generate a page-load (or frame-load); either you get a new page, or a refresh of the old one.
The only way I have ever found to keep a clicked-on <A> tag from reloading the frame (or page) is to put in an explicit javascript function:
Code:
<a href="javascript:doClickAction()">
Otherwise, as you noted, either you don't actually have a link (href="#") or you get a page reload. This is quite often irritating, but I have found that putting the javascript pseudo-URL produces the result that I think you are after.