[thelist] javascript ignores "return false" in IE ?
Robert Vreeland
vreeland at studioframework.com
Thu Mar 3 16:12:06 CST 2005
Try:
<a href="javascript: swapImage(); return false;">
or
<a href="#" onclick="return swapImage(); ">
Note, your function will need to return false.
Robert Vreeland
Managing Partner
StudioFramework
----- Original Message -----
From: "Stephen Rider" <evolt_org at striderweb.com>
To: <thelist at lists.evolt.org>
Sent: Thursday, March 03, 2005 4:37 PM
Subject: [thelist] javascript ignores "return false" in IE ?
> 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
>
> --
>
> * * Please support the community that supports you. * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
More information about the thelist
mailing list