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.
Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    New to the CF scene
    Join Date
    Oct 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm having a problem right now where

    var oNode = Event.target; //for FireFox
    and
    var oNode = Event.srcElement; //for IE

    are not producing the same behavior. I've seen a few places say not to use "this" but when I replace my Firefox line with:
    var oNode = this;
    Everything seems to work. The larger problem is that prototype.js uses the Event.target as an equivalent so when I try to use that library I do not get the DOM behavior I need.

    Question: Does anyone know the "right" way to use Event.target so that I get all of the DOM information?

  2. #17
    New to the CF scene
    Join Date
    Oct 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I don't know if anyone besides me is still reading this thread but I fixed my problem by creating a function that returns the node I actually want in botth browsers. Does anyone see anything glaringly wrong with this code?

    function getEventOrigin (event)
    {
    return event.currentTarget || event.srcElement;
    }

    More importantly is this really returning the same thing in both browsers or does it just happen to work?


 
Page 2 of 2 FirstFirst 12

Posting Permissions

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