OR operator in IE7

Discussion in 'JavaScript' started by JiveturkeyJay, May 13, 2010.

  1. #1
    Hello Folks

    First post here, been trying to use this code

    function target(){
    e = e || getEventObject(e);
    var target = e.target || e.scrElement;
    return target;
    }

    Works fine in firefox but not in IE the first e=e || getEventObject(e) is being ignored by IE
    I can code this using if statements but was wondering why the short cut is not working.

    Any help appreciated

    JiveturkeyJay
     
    JiveturkeyJay, May 13, 2010 IP