Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Click on Overlay . Simulating Click using Jquery

I am overlaying hidden rectangle on my iframe. Then Detecting click inside my rectangular region. Then i will take its (X,Y) and simulate a click inside iframe on same coordinate(X,Y).

This way, i will pass user's click on hidden rectangular area to iframe as it is not possible to directly detect events on iframe because of security issues.

This will bypass that issue.

Some problem with my code. Not able to pass click to iframe on triggering.

Here is Js Fiddle

http://jsfiddle.net/biggenius/Y8cVD/9/

Here is a way to click inside box. http://jsfiddle.net/styson/PxcBs/1/

How to detect click on Overlay?http://jsfiddle.net/biggenius/Y8cVD/13/

Here are some solution worth considering. http://stackoverflow.com/questions/10226448/detecting-click-inside-iframe-using-invisible-div/10226475#comment13139245_10226475

https://i.sstatic.net/fQiJT.png

like image 708
Robert Lowery Avatar asked Dec 13 '25 16:12

Robert Lowery


1 Answers

You mean like this? There were a couple of missing brackets/slight syntax errors in your fiddle :)

Demo: http://jsfiddle.net/Y8cVD/14/

like image 63
mattytommo Avatar answered Dec 15 '25 07:12

mattytommo