Capturing HTMLElement Type

Add-in Express™ Support Service
That's what is more important than anything else

Capturing HTMLElement Type
 
jaylaforte




Posts: 4
Joined: 2010-04-13
Hello,

I am attempting to access the class type of an element inside of an HTML event and am unsure how to do so. The object is of type mshtml.IHTMLElement. I attempted to access it by using the "getAttribute" method but I apparently do not have access rights. I apologize if this is a dumb question - I'm a newbie!

Any ideas?

Thanks!
-Jason
Posted 13 Apr, 2010 10:12:00 Top
jaylaforte




Posts: 4
Joined: 2010-04-13
Just to clarify - I have purchased the premium version of Add-In Express for Internet Explorer. I'm not just looking for free advice! ;-)
Posted 14 Apr, 2010 08:51:30 Top
Andrei Smolin


Add-in Express team


Posts: 18793
Joined: 2006-05-11
Hello Jason,

Currently, there's no possibility to achieve this. We plan to provide such a feature in the next build that will occur in 4 weeks or so. If we are able to prepare the build earlier, we will let you lnow.


Andrei Smolin
Add-in Express Team Leader
Posted 14 Apr, 2010 11:10:19 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Jason.

Please try to use the code below:

private void adxiehtmlDocEvents1_OnClick(object sender, object eventObject, AddinExpress.IE.ADXCancelEventArgs e)
{
mshtml.IHTMLEventObj2 obj = eventObject as mshtml.IHTMLEventObj2;
if (obj != null)
{
mshtml.IHTMLElement elem =
this.HTMLDocument.elementFromPoint(obj.x, obj.y);

if (elem != null)
MessageBox.Show(elem.innerText);
}
}
Posted 17 Jun, 2010 08:29:22 Top