You see both of these methods being used so often that you have to wonder – which is correct?
When you use “return false” on onclick eg. onclick=”functionName();return false” the browser doesn’t try to go to whatever is specified in the href when the link is clicked. If the onclick calls a submit function then you have effectively asked the browser to go to the href and the action of whatever form you are submitting.
So this is probably the best of both worlds.
Other possibilities for the href are