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: iDRiS Date: March 5, 2004

Thanks!  That worked... ie and standards...  I like mozilla for that.  Actually another wierd problem i found is when i do document.createObject("IMG") then I try to do setAttribute and set an onMouseOver on it, it only works in mozilla, not ie.  Strange...

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

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