I am trying to prevent the page from reloading when the user clicks the link, so I wrote:
<a href="javascript: return false">bla</a>
or
<a href="#">bla</a>
Seriously, I don’t like to use it #, because when the user clicks on the link, the url is added with a # character on the address bar, this makes the URL ugly. Therefore, I prefer to use javascript: return false, but firebug show error: "return not in function", can I find out how to fix the error?
source
share