Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Nov 2008
    Posts
    165
    Thanks
    0
    Thanked 0 Times in 0 Posts

    event is undefined

    I cant figure this one out

    i have this code working great in firefox

    Code:
    alert(e)
    in explorer it alerts "undefined"

    i tried

    Code:
    alert(event)
    but still i get undefined

    but in firefox it alerts [object MouseEvent] as it should

    whats the solution whats wrong with my explorer

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,801
    Thanks
    160
    Thanked 2,216 Times in 2,203 Posts
    Blog Entries
    1
    try
    Code:
    if(!e) e=window.event;
    alert(e);
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,727
    Thanks
    202
    Thanked 2,507 Times in 2,485 Posts


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •