My javascript is WAY rusty.  Coudl someone take a quick look at this and 
tell me what bonehead thing I am doing wrong?

This works in FF, but not IE.

if(window.addEventListener) {
    alert("ff detected");
        var kkeys = [], konami = "38,38,40,40,37,39,37,39,66,65";
        window.addEventListener('keydown', function(e) {
                kkeys.push( e.keyCode );
        //alert(e.keyCode);
                if ( kkeys.toString().indexOf( konami ) >= 0 )        
       
                        window.location="http://www.google.com";;
    }, true)
}
else if(window.attachEvent) {
    alert("ie detected");
    var kkeys = [], konami = "38,38,40,40,37,39,37,39,66,65";
    window.attachEvent('onKeyDown', function(e) {
                kkeys.push( e.keyCode );
        alert(e.keyCode);
                if ( kkeys.toString().indexOf( konami ) >= 0 )        
       
                        window.location="http://www.google.com";;
    }, true)
}

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-community/message.cfm/messageid:296329
Subscription: http://www.houseoffusion.com/groups/cf-community/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5

Reply via email to