user2991612
user2991612

Reputation: 11

How to see if the user click inside something?

Hey guys i have a little problem.

I have a page something like this:

<div id="the_box"><iframe src="somesite"></iframe></div>

I have the div on my page but inside the iframe theres a form from another site where i would like to know when the user clicked a button inside that frame, is there a easy way to register that a user clicked?

Upvotes: 1

Views: 39

Answers (2)

Jayanth Ramachandran
Jayanth Ramachandran

Reputation: 8746

No this cannot be done . Maximum you can know is when the user clicks anywhere on the iFrame. Not on any elements inside the IFrame , as that violates the browser rules and Internet protocols .

Upvotes: 0

Rory McCrossan
Rory McCrossan

Reputation: 337560

This is not possible due to browser security restrictions. Events are not allowed to propagate over iframe elements whose src attribute is an external domain.

Upvotes: 1

Related Questions