• Post Reply Bookmark Topic Watch Topic
  • New Topic

Multiple applets instances confused  RSS feed

 
Siegfried Heintze
Ranch Hand
Posts: 417
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to implement a simple mouse roll-over in a simple question-answer applet. See http://216.121.166.169.
The applet displays a question and when you rollover with the mouse, the answer is displayed.
The problem is that when I have two instances of the same applet on the same web page, only the first instance displays the answer when I hover over it with the mouse -- even when I hover over it the second instance, the first one still shows its answer. How can I fix this so that the applets only respond to their own mouse events and not the other's?
Thanks,
 
TransZamboni
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try using the source of the eventObject.
Example:

When you get the source of the event then you can track back to the applet where you can then call a method that displays your answer.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!