How to Detect a Click from an Iframe for a Specific Div? Need Help!

16 Replies, 1503 Views

Wow, thanks so much, everyone! I didn’t expect so many helpful replies. I tried the `postMessage` approach, and it’s working now! I was definitely missing the part where I needed to wait for the iframe to load fully before attaching the event listener.

Quick follow-up: Has anyone tried this with dynamically loaded iframes? Like, if the iframe content changes after the initial load? Would I need to reattach the event listener every time? Thanks again, you guys are awesome!

Messages In This Thread



Users browsing this thread: 1 Guest(s)