Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
inet
active_desktop
active_scrptng
asp.components
asp.db
asp.general
comctl32
comp.packaging
components.dev
dbweb
dhtml_editing
docobjects
html_authoring
html_objmodel
iis
iis.ftp
iis.security
iis.smtp_nntp
indexserver
misc
mshtml_hosting
scripting.jscript
scripting.vbscript
sdk_setup
shell_objmodel
urlmonikers
webbrowser_ctl
wininet
  
 
date: Mon, 05 Nov 2007 17:43:18 -0000,    group: microsoft.public.inetsdk.programming.html_objmodel        back       


Attach Events to elements dynamically created by JavaScript   
Hi,
I am writing an browser helper object that is used to detect clicks on
web page elements (e.g. links). During the DocumentComplete event, I
get a list of all the elements and attach events to them via the
IHTMLElement2::attachEvent method. This works fine for most pages.

However there are some pages where some of these elements may get
created by the javascript code on the web page. This will then
typically take place after the DocumentComplete event has fired. Since
these elements are created after the DocumentComplete event was fired,
the attachEvent method will not have been called for these new
elements. Does IE generate any event when a new element is created so
that I can use the attachEvent on the element? Is there some other way
to know when an element was created? Is there any other way to achieve
what I am trying to do?

Thanks in advance,
-Pascal
date: Mon, 05 Nov 2007 17:43:18 -0000   author:   unknown

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us