2

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.

Pradeep
  • 78
  • 1
  • 2
  • 8
  • I have tried the approach from the question [link]http://stackoverflow.com/questions/30005/how-do-i-fire-an-event-when-a-iframe-has-finished-loading-in-jquery [link] with no luck – Pradeep Apr 23 '12 at 23:03

1 Answers1

1

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

Brandt Solovij
  • 2,124
  • 13
  • 24