1

I'm having an iframe containing few anchors with target="_blank" attribute.

Whenever user clicks that anchor which will cause opening a new tab I would like to control that behaviour and handle it in my function.

(anchor URL's are always pointing to my website, not external ones)

I have tried using the onunload event, however it appears that its working only when action happens within that certain tab and not a new one.

Kesse
  • 275
  • 3
  • 12
  • Please refer this link - https://stackoverflow.com/questions/13439303/detect-click-event-inside-iframe – hybrid Oct 21 '17 at 04:12
  • @hybrid I have seen that one before. I'm pretty sure there is a way not to relate this to the `iframe` and simply detect if an user has opened an `_blank` anchor somehow, hence the question. If this is not possible, I would love to get the answer on that with details. – Kesse Oct 21 '17 at 04:30

0 Answers0