How to know click event is from iframe document? Also how to access parent document of iframe document?

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

How to know click event is from iframe document? Also how to access parent document of iframe document?
 
Sharang Patil




Posts: 2
Joined: 2011-08-23
If I click hyperlink in iframe, in event "BeforeNavigate2" how to know if this event is from iframe document?

Also can we access main document loaded in browser(loaded by entering url in addressbar), in events fired in iframe.

Public Sub IEModule1_BeforeNavigate2(e As AddinExpress.IE.ADXIEBeforeNavigate2EventArgs) Handles Me.BeforeNavigate2

End Sub

Thanks,
Sharang
Posted 23 Aug, 2011 07:00:17 Top
Sergey Grischenko


Add-in Express team


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

To get the parent object of any HTML elements you can use the parentElement property of the element. Using this property, you can determine if the parent is the iframe element.
Posted 23 Aug, 2011 10:07:47 Top