Hi subhro,

you can try this kind of code. First file, the main HTML page:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
    <title> iframe loaded verification </title>
    <script src="prototype.js" type="text/javascript"></script>
    <script src="scriptaculous.js" type="text/javascript"></script>
    <div id="wrapper">
    Hello, click here
    <div id="framed"></div>
      function MyIframeReadyStateChanged(){
        alert('great, it\s loaded');

        var _iframe=document.createElement('IFRAME');


and it calls the test.html file that in your exemple will contain the
PDF (here to simplify, it's an image):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
    <title>the PDF file replaced with an image</title>
  <body onLoad="window.parent.document.fire('PDF:loaded');">
    <img src="http://upload.wikimedia.org/wikipedia/commons/thumb/b/b7/
Wikipedia-logo.svg/300px-Wikipedia-logo.svg.png" />

the first script will create the i-frame, and will listen to a custom
event: 'PDF:loaded' and on the body tag of the second file, on the
onload event, it will call the custom event. Or it could be possible
to do it in the other way, by applying an event from the main page
directly to the iframe (but I'm not successfull to do this).


On 6 fév, 15:19, disccomp <discc...@gmail.com> wrote:
> It looks like your on your way to a solution. It's one thing to post
> technical questions, your first post was great. You'll probably see
> this again GIYF(Google is your friend) Try experimenting with events.
> (Event.observe)
> Before asking for code, Ask yourself, "Am I a help 
> vampire?"http://www.slash7.com/pages/vampires
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to