1

On my ASPX page I am showing other webiste in a Iframe, in fact I am posting a form to other domain and target of that form is Iframe. It takes little while by the time page is shown in Iframe. So I would like to show some indication that page is loading and take it out when page ( From other domain) is loaded in Inframe. How do I do that? I tried onload event of the IFrmae but it doesn't work exactly the message goes away just before loading the page. Thanks!

THis is my code. On button click event I post the following form ( Action is on the other domain)

<form id="frmSSO" action='<%=formAction%>' method="post" name="frmSSO" target='iframe1' onload="hideProgress()" >
    <input type="hidden" name="TARGET" value='<% = formTarget%>' />
    <input type="hidden" name="Encoding" value="B64" />
    <input type="hidden" name="SAMLResponse" value='<% = resp%>' />              
</form>
user228777
  • 3,082
  • 9
  • 33
  • 50
  • can you show some code? you html with iframe ? – Rafael Herscovici Aug 25 '11 at 19:07
  • 1
    Possible duplicate of http://stackoverflow.com/questions/30005/how-do-i-fire-an-event-when-a-iframe-has-finished-loading-in-jquery. For any type of content in the iframe except a PDF, it sounds like the solutions are well-documented. – Alex Churchill Aug 25 '11 at 19:08
  • alex c The link you provide me helped and was able to find the solution. How do I mark it as a answer? Thaks you!! – user228777 Aug 26 '11 at 12:33

1 Answers1

0

You can layer a div over top of the iframe temporarily, but there is no way to know when it is safe to hide the div.

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
  • This is what I am struggling when to hide this div, I tried onload for IFrame but it hides way in advance before the page loads in Iframe – user228777 Aug 25 '11 at 19:17