I have an html page, and I need a link to show that the user would be going to ‘example.html’, when really, the link goes to ‘javascipt:ajaxLoad(example.html);’.
I tried this:
<a href="example" onclick="javascipt:ajaxLoad(example.html);">Example</a>
But it didn’t work. Any help? I already asked the webmasters stackexchange, and they told me that this would be a javascript programming question. Not an html question.
By returning false you prevent the default action. And this way the links will still work when javascript is disabled, but then you don’t get the AJAX functionality.