I have a page which has an iFrame loading a credit card payment form from a 3rd party site[PCI compliance sake].
I have two problems I am trying to sovle.
1,The page and the iframe loads at different speeds causing a flicker on the page. How do I synchronize the iframe load and the page load?.
2,If the 3rd party site is down, I want to replace the iframe or atleast redirect it to a different source. How do I determine the iframe failed to load.
@ #2 : Poll the 3rd party page with a server side technology before you render the page to the end user – then determine what is the best course of action ( display iframe (groan) or present an ‘unavailable’ dialog )
@ #1 – ideally you would incorporate a polling process a la the (@ #2 Solution) above and simply draw the page once available, or handle it as the asynchronous component it is, and incorporate a polling process + display logic ( like fadein or animate – since you have jquery tagged ) once available.