WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 Some problems with Object Oriented Javascript, iDRiS, March 5, 2004
     Re:Some problems with Object Oriented Javascript, Saint Jude, March 5, 2004
         Re:Some problems with Object Oriented Javascript, iDRiS, March 5, 2004

Subject: Re:Some problems with Object Oriented Javascript From: Saint Jude Date: March 5, 2004

First, I should admit that I haven't read all through your code - or run it.
That said, from your description it sounds like this may be the problem.:

Unlike the standards' addEventListener, IE's attachEvent results in a function that is
called in a GLOBAL context. In other words, this refers to the window, not your element
that the event is attached to. The function 'attached' is simply called as if it were called: myFunction( )

You may have to go back to using old-style JavaScript event registration:

myElement.onclick = functionName

I hope I've got the right end of the stick.




Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX