Reputation: 4199
I have 2 <iframe>
on my main HTML form.
These <iframe>
are loaded from different external domains. Sometime external server goes offline and user see The page can't be dispayed
message on my page.
Is there a way to hide these <iframe>
when target server is not available?
Upvotes: 0
Views: 202
Reputation: 3251
You can use onload
event to display iframe content. Make iframe invisible by default and set visible in onload
event,
Upvotes: 1
Reputation: 38046
You could set up a listener for the load
event and if this isn't called within a certain timespan then you hide the frame..
Upvotes: 0