I have to make a note about using "#" as the target for links when all you want out of the link is an anchor for your onClick event. I just linked to Dane Carlson, who has little arrows you can click on which pop up Radio's new comments feature.
That little arrow uses a "#" as the target of the link... why? You're supposed to use javascript:void(0) for these things. This has been known forever, but no one uses it... just like label tags have worked in IE forever, but no one uses them either...
I have to look though some old e-mail, but hopefully I'll post a justification for using javascript:void(0) here later. There are many reasons why this is better.
By the way, check out the JavaScript FAQ Knowledge Base from irt.org.
Ok, I found that old e-mail. Check out the void operator documentation from Netscape. Using some variant of javascript:void(0) is what they recommend: "You can use the void operator to specify an expression as a hypertext link. The expression is evaluated but is not loaded in place of the current document."
The main reason not to use the anchor "#" as a location is that it actually changes the URL you're browsing. It creates an extra location to go through in the history (so when you click back it looks like nothing happens), and most jarring is that it'll bump you up to the top of a web page.
Dane Carlson sent me an e-mail saying he knows about the problem, and that it's actually hardcoded that way into Radio so he can't help it. I didn't know that. Also, he referred me to this from Kottke.org: A short guide to doing JavaScript pop-up windows properly. I didn't even know about the best way to do it. Thanks Dane, Jason, and Milo 
Dane also sent an e-mail to Dave Winer telling him about this. It'll be interesting to see if Dave acts on it.
Feel free to post a comment below. Please see my comment policy.
Formatting Rules (No HTML):