Yup - that's a common issue with doing that. Here you go:
<a href="javascript:" onClick="doSomethingElse()">anchor text[/url]
I'm not a big fan of javascript pseudo-protocols in the href attribute - that should always be a URL.
Instead, why not just cancel the default action of the link with return false? So instead just do:
<a href="aProperUrl.html" onclick="doSomethingElse(); return false">anchor text[/url]
Or, even have the function returning a false value, so the above can be reduced further to:
<a href="aProperUrl.html" onclick="return doSomethingElse();">anchor text[/url]
where
function doSomethingElse() {
// do something else logic
// and return a boolean response
return false;
}