skip to main | skip to sidebar

Web developer oddities

Thursday, 12 November 2009

Anchor link fires despite "return false"

I wasted a long time wondering why I couldn't stop the link for an anchor tag firing after the onlick Javacsript had run. Was it because I was setting the onclick function using window.onload? 

No - it was because I had errors in the function that I was calling. And because of that, it wasn't getting the the return false at the end (which is what stops the src link being followed by browsers with Javascript working).





Posted by John Geddes at 23:00

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2013 (1)
    • ►  January (1)
  • ►  2012 (1)
    • ►  June (1)
  • ►  2011 (6)
    • ►  November (1)
    • ►  March (2)
    • ►  February (3)
  • ►  2010 (18)
    • ►  November (1)
    • ►  October (5)
    • ►  August (5)
    • ►  July (1)
    • ►  May (1)
    • ►  April (1)
    • ►  March (1)
    • ►  January (3)
  • ▼  2009 (8)
    • ▼  November (3)
      • Making titles look right
      • Anchor link fires despite "return false"
      • Scriptaculous Sortables - this.observer is not a f...
    • ►  October (2)
    • ►  February (2)
    • ►  January (1)
  • ►  2008 (2)
    • ►  December (2)
  • ►  2007 (6)
    • ►  November (1)
    • ►  September (1)
    • ►  August (1)
    • ►  July (3)

About Me

John Geddes
View my complete profile