# Internet explorer "return false" solution

**URL:** <https://forum.kirupa.com/t/internet-explorer-return-false-solution/275287>\
**Category:** web dev\
**Created:** [November 12, 2008, 3:23am UTC](https://forum.kirupa.com/t/internet-explorer-return-false-solution/275287 "2008-11-12T03:23:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![joran420](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/joran420/32/2329_2.png) [@joran420](https://forum.kirupa.com/u/joran420)\
**Post date:** [November 12, 2008, 3:23am UTC](https://forum.kirupa.com/t/internet-explorer-return-false-solution/275287/1 "2008-11-12T03:23:33Z")

</div>

I wanted a certain link to not be followed on click. and could get it fine in ff and opera using return false in the on click but in ie it would still follow the link. I dunno  
its probably common knowledge but i spent a while trying to solve it

```auto
 
//IE uses the event object so you set that to return false... 
//FF the event object does not exist so the if statement checks to make sure
 //the event object exists.    
 if("undefined" != typeof(event) )event.returnValue = false; 
    return false; 
 

```

just add the event line right before you return false…then it should work in ie and ff and all the browsers ive tested
