View Single Post
Old 06-10-2008, 06:14 PM   #9 (permalink)
xenon
The Frequenter
Newcomer 
 
xenon's Avatar
 
Join Date: Dec 2007
Location: Bucharest, Romania
Posts: 438
Thanks: 3
xenon is on a distinguished road
Default

That's the most stupid method you could use. The right way:

Code:
<a href="destination-page.html" onclick="dosomething(); return false;">some link</a>
The return statement in the onclick action is the most important. If you have javascript, then the dosomething function will be executed, and that's it. If you don't have javascript, however, the browser will ignore the onclick attribute and follow the href attribute.
__________________
I have optimistic thoughts, even though sometimes (if not always) life's a bitch.
xenon is offline  
Reply With Quote