[Fixed] iFrame on click event isn’t working

This is a complex problem most people may face. I was working on a dynamic ad generation tool and I have to make an ad script. So that ad script was containing iframe.

I was able to render that iframe successfully, but the requirement was passing a dynamic parameter to iframe and read that parameter on click.

I spend almost 4 hours to figure it out. I tried a lot of ways and at the end, I found the solution and thought to share with you guys.

You can see here working for example.
https://jsfiddle.net/mukeshsalaria01/pd0wjjjw/114/#

Just click on add and it will show an alert message box with value. All code is also available on jsfiddle.

I hope that will save your time and efforts.

thanks!

Posted by | View Post | View Group