I have an iframe on my site. I do not own the website in the iframe and can't edit the code.
When a user clicks a link inside the iframe the iframe redirects the top level url.
I want to detect when the page is about to be redirected and display a notice saying they are about to be redirected. I have tried using unload.function but it does not get triggered.
$(document).unload(function()
{
alert(1);
});
Is it possible to execute js after the user has clicked the link in the iframe before the page is redirected?
Thanks