redirect iframe if page cannot be displayed

Discussion in 'JavaScript' started by moron3, Feb 9, 2010.

  1. #1
    Is it possible to use Javascript to redirect an iframe if the page it's supposed to load cannot be displayed or the server is down?

    One way I thought of doing it would be to direct the iframe to a page, wait a few seconds, then check the locationName to see if it is blank. If it is, then redirect the iframe to the alternate page. But that's probably cheesy and I don't know how to write the code for it anyway.
     
    moron3, Feb 9, 2010 IP