<a href="javascript:void(0)" onClick="javascript:my_function();">Click here</a>
The href can alternatively be set with the URL to use if the users doesn't have javascript enabled, use Return false in the javascript if you don't want the link to auto trigger
Feel free to comment if you can add help to this page or point out issues and solutions you have found. I do not provide support on this site, if you need help with a problem head over to stack overflow.