tag:blogger.com,1999:blog-2341502915119631850.post5637215423974034458..comments2023-12-12T17:47:03.291+01:00Comments on The Puf Principle: iframe.onload doesn't fire for ActiveX controlsFrankhttp://www.blogger.com/profile/13688437747795053947noreply@blogger.comBlogger10125tag:blogger.com,1999:blog-2341502915119631850.post-61512302711638396602007-10-26T20:18:00.000+01:002007-10-26T20:18:00.000+01:00Thanks, I didn't realize that. That should help re...Thanks, I didn't realize that. That should help reproducing the issue, when we start working on a new version of the product. :-)Frankhttps://www.blogger.com/profile/13688437747795053947noreply@blogger.comtag:blogger.com,1999:blog-2341502915119631850.post-36663869039754491972007-10-26T18:30:00.000+01:002007-10-26T18:30:00.000+01:00The problem with the readyState is it only works i...The problem with the readyState is it only works in IE not FF ...Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2341502915119631850.post-45114143125133658162007-09-09T23:16:00.000+01:002007-09-09T23:16:00.000+01:00This comment has been removed by a blog administrator.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2341502915119631850.post-18004679587887810232007-08-24T06:42:00.000+01:002007-08-24T06:42:00.000+01:00Hi anonymous,Good one. Hooking onreadystatechange ...Hi anonymous,<BR/><BR/>Good one. Hooking onreadystatechange should indeed work.<BR/><BR/> FrankFrankhttps://www.blogger.com/profile/13688437747795053947noreply@blogger.comtag:blogger.com,1999:blog-2341502915119631850.post-32581605272706250892007-08-24T00:53:00.000+01:002007-08-24T00:53:00.000+01:00I've just read somewhere else a few minutes ago (i...I've just read somewhere else a few minutes ago (it was an old discussion thread in '03) that onload does not work for the iframe and that onreadystatechange should be used instead. I've just tried it myself and it seems to work.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2341502915119631850.post-84756674725901283582007-07-07T09:06:00.000+01:002007-07-07T09:06:00.000+01:00Hi Wrighty,Polling the location is pretty simple i...Hi Wrighty,<BR/><BR/>Polling the location is pretty simple in javascript. I've set up an example at http://www.vanpuffelen.net/pufprinciple/iframe_onload/page.html . Note that you will only get a location if the page in the iframe is from the same domain as the page containing the iframe.<BR/><BR/>Setting up an indirection page is a bit more involved. In our case we have a web application that is serving all content from a database. When we detect that we're requested to serve a PDF, we instead serve a normal HTML page that says we are about to download the requested PDF. In that page, we include a link that will download the PDF. This indirection page will then trigger the onload event and will actually also work with the setTimeout function.<BR/><BR/>It this making it a bit clearer? If not, I can try to set up an example of an indirection page too. But that will take some more effort, since it works best with some server side scripting.<BR/><BR/> FrankFrankhttps://www.blogger.com/profile/13688437747795053947noreply@blogger.comtag:blogger.com,1999:blog-2341502915119631850.post-49832614460097604942007-07-04T05:19:00.000+01:002007-07-04T05:19:00.000+01:00Hi, I am having the same problem - I was wondering...Hi, I am having the same problem - I was wondering if you could post your solution. I have not heard the terms indirection page or poll the location property before.<BR/><BR/>Thanks<BR/>SaraUnknownhttps://www.blogger.com/profile/13245350272922301061noreply@blogger.comtag:blogger.com,1999:blog-2341502915119631850.post-29949756789309512912007-06-13T08:39:00.000+01:002007-06-13T08:39:00.000+01:00Thanks Frank.Will certainly let you know if I find...Thanks Frank.<BR/>Will certainly let you know if I find another solution.<BR/><BR/>Regards,<BR/>RoddiAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-2341502915119631850.post-2372625930520743722007-06-13T06:53:00.000+01:002007-06-13T06:53:00.000+01:00Hi Roddi,Unfortunately there seemed no way to real...Hi Roddi,<BR/>Unfortunately there seemed no way to really solve the problem. We worked around it by doing two things:<BR/>1) poll the location property of the iframe window object, instead of waiting for onload to fire.<BR/>2) introduce an indirection page before PDFs (and other binaries) are served. The HTML indirection page DOES fire onload and allows us to update the client. The indirection page is served when our content handler detects that it's serving out binary content.<BR/><BR/>Hope this helps. If you find another solution, I'd be interested to hear about it.<BR/><BR/> FrankFrankhttps://www.blogger.com/profile/13688437747795053947noreply@blogger.comtag:blogger.com,1999:blog-2341502915119631850.post-57328858657556848992007-06-12T13:33:00.000+01:002007-06-12T13:33:00.000+01:00Hi, I'm having exactly the same problem - iframe's...Hi, I'm having exactly the same problem - iframe's onload doesn't fire if its src is a PDF (but it works fine if the src is text or HTML). This is with IE 7 on Win XP Pro. Did you find any solution to this?<BR/><BR/>Regards,<BR/>Roddi<BR/>roddiwalker [at] yahoo [dot] comAnonymousnoreply@blogger.com