How to capture and hide iframe js error?

I want to hide and capture the iframe js error, iframe is in the same domain, so there is no such problem with the script on different sites, any help, suggestion?

+4
source share
1 answer

Suggest you implement a try / catch JavaScript block that throws an error for some hidden form control in an IFrame:

try{ //your javascript that can throw an error } catch(e) { document.getElementById("YourHiddenControlId").value = e.Message; } 

Then you can access the form variable in the IFRame.

+2
source

All Articles