2

Possible Duplicate:
How to display loading message when an iFrame is loading? — JQuery

I have an <iframe> element in my code that I am setting the src to a third party site. This source is a search tool, so it has textboxes and a button to click to perform the search. The problem is that this search tool is very slow, so I want to display a loading message to the user after they click on the button to perform the search. Is there a way for me to detect that the <iframe> is currently loading new content from my page? Since the source is from a third party, I can't handle anything on button click (that I know of at least).

Community
  • 1
  • 1
Eric R.
  • 1,105
  • 3
  • 21
  • 48
  • See the duplicate: you need to listen to the onload handler of the iframe. – Diodeus - James MacFarlane Dec 20 '12 at 16:35
  • 1
    The duplicate is similar, but doesn't answer the question. In this case .ready() isnt an option. I don't think there is a way to detect when the iframe begins to load a new page. – Kevin B Dec 20 '12 at 16:41
  • 'src to a third party site' - no way – el Dude Dec 20 '12 at 16:42
  • In that example, it works for when the iframe loads its initial content. But when there is a button from the source that causes new content to load, it doesn't show the loading message anymore. – Eric R. Dec 20 '12 at 16:42
  • 5
    I'm going with it isn't possible unless proven otherwise. Since it's a 3rd party site, you don't have any access to it other than the onload callback. – Kevin B Dec 20 '12 at 16:44

0 Answers0