Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem unbinding events
Message
De
27/09/2005 11:08:35
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Problem unbinding events
Divers
Thread ID:
01053447
Message ID:
01053447
Vues:
47
Greetings,

I'm successfully binding all onclick events for links in an HTML document using the following code...
thisform.oEv = CREATEOBJECT("myHTMLDocumentEvents") 
loNodes = thisform.olecontrol1.Document.getElementsByTagName("A")  && Get links
 
FOR EACH loNode IN loNodes
       EVENTHANDLER(loNode,thisform.oEv)   && Bind the onclick event for the link
ENDFOR
Now I'm trying to unbind the events with the following code:
loNodes = thisform.olecontrol1.Document.getElementsByTagName("A")
 
FOR EACH loNode IN loNodes
      EVENTHANDLER(loNode,thisform.oEv, .T.)  && unbind the onclick event for the link
ENDFOR
 
It seemed straight forward, but unfortunately the unbinding part never happens and the result always returns .F.

Any ideas????

Thanks in advance!
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform