[thelist] javascript ignores "return false" in IE ?

Stephen Rider evolt_org at striderweb.com
Thu Mar 3 15:37:45 CST 2005


I'm completely confused.  I have the following link that runs a 
javascript:

<a href="index.htm" onclick="swapImage(); return false;">

(i've also tried it as:  a href="" )

The "return false" should prevent loading index.htm when a user clicks 
the link, but in IE (and it seems only in IE) it doesn't.  The script 
runs and then the browser goes to index.htm.

Does anyone know how to fix this?  I don't want the browser to go to a 
different page!

Regards,
Steve



More information about the thelist mailing list