0
how to handle iframes fail to load
how to handle failed pages loaded in the iframe by displaying an error message or hiding the url loaded in the iframe or in essence the user cannot see the url of the iframe page, for example run my code below offline https://code.sololearn.com/WkwpKPgViOMe/?ref=app
9 Réponses
+ 2
There is no way to test for an error within an iframe.
+ 2
Ore Adeleye yes, it works but when left in a few seconds the online state closes on its own, do you also experience it or just me
+ 1
Calviղ is there any other way besides using iframe?
+ 1
You can. See this
https://code.sololearn.com/WDt89r2nBPo1/?ref=app
+ 1
Ore Adeleye thank you for your code but I open it offline still shows success
+ 1
Avirur Rahman I've edited it. Check now. It works on my device. I am using sololearn app playground
https://code.sololearn.com/WDt89r2nBPo1/?ref=app
+ 1
Avirur Rahman That's a really weird bug. I don't know why that happens. I tried the code in firefox and it worked smoothly but does not work on sololearn
+ 1
Ore Adeleye I tried it on my computer but it still doesn't work, I use the Chrome browser and Opera
0
Avirur Rahman I saw this on stack overflow
https://stackoverflow.com/questions/9249680/how-to-check-if-iframe-is-loaded-or-it-has-a-content
I think this should work