Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem unbinding events
Message
From
27/09/2005 11:08:35
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Problem unbinding events
Miscellaneous
Thread ID:
01053447
Message ID:
01053447
Views:
46
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!
Next
Reply
Map
View

Click here to load this message in the networking platform