I'm developing a couple of AJAX-based data browsers, and I'm delighted with the response times and the look and feel of the pages. The one issue I'm having right now is with page positioning. When I click on a link which refreshes the browser with new content, it jumps back to the top of the page.

Ideally I'd like it to remain where it is.

The code for the link looks like so:

Code:
<a href="#" onclick="fetchCategories(this, 12345, 67890);"></a>
fetchCategories() returns false.

I'm guessing that just returning false doesn't seem to be enough. You actually have to put in a return false; at the end of the onclick.

Can someone explain why this is, and how this works?

Thanks.