views:

40

answers:

2

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?

A: 

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..

Sean Kinsey
+1  A: 

You can use onload event to display iframe content. Make iframe invisible by default and set visible in onload event,

Thevs