refresh parent window on load of child window

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • minay111
    New Member
    • Sep 2007
    • 10

    refresh parent window on load of child window

    Hello Experts,

    i've to open child window whose content type is "applicatio n/pdf";

    Now i want to refresh the parent window after loading of the child window.
    My problem is that i can not write any javascript in the child window since its content type is 'application/pdf' [Javascript does not works here].

    what to do in parent window to know that pdf file is filly opened in child window so that i can refresh it???
    please help me to find the solution for this problem.

    Thanks in advance

    Mina
  • Velhari
    New Member
    • Sep 2006
    • 46

    #2
    Originally posted by minay111
    Hello Experts,

    i've to open child window whose content type is "applicatio n/pdf";

    Now i want to refresh the parent window after loading of the child window.
    My problem is that i can not write any javascript in the child window since its content type is 'application/pdf' [Javascript does not works here].

    what to do in parent window to know that pdf file is filly opened in child window so that i can refresh it???
    please help me to find the solution for this problem.

    Thanks in advance

    Mina
    Hi,

    the following code will helps....

    Code:
    var new_window = window.open(url);
    do{
         status = new_window.document.readyState;
    }while(status != "complete")
    From the above code, "do" loop will execute until your child window loaded fully.
    So, you have to write the code (to execute after child window loads) after "do" loop

    Hope this helps.

    Comment

    • minay111
      New Member
      • Sep 2007
      • 10

      #3
      Originally posted by Velhari
      Hi,

      the following code will helps....

      Code:
      var new_window = window.open(url);
      do{
           status = new_window.document.readyState;
      }while(status != "complete")
      From the above code, "do" loop will execute until your child window loaded fully.
      So, you have to write the code (to execute after child window loads) after "do" loop

      Hope this helps.

      Hi Velhari,

      Thanks for the reply.
      You are right, but this code works fine pop-up contains html text
      but my popup displays a pdf and it gives javascript error to me i.e
      "Permission Denied"

      i dont know the reason for this. please help???

      Mina

      Comment

      • minay111
        New Member
        • Sep 2007
        • 10

        #4
        Originally posted by Velhari
        Hi,

        the following code will helps....

        Code:
        var new_window = window.open(url);
        do{
             status = new_window.document.readyState;
        }while(status != "complete")
        From the above code, "do" loop will execute until your child window loaded fully.
        So, you have to write the code (to execute after child window loads) after "do" loop

        Hope this helps.
        Hi Velhari,

        In the case of PDF i've to write a little modified code

        do{
        status = win.document.re adyState;

        }while(status != "interactiv e")

        Now it seems to work fine, i've to test it and analyse.

        Regards
        Mina

        Comment

        • minay111
          New Member
          • Sep 2007
          • 10

          #5
          Hi Velhari,

          Thanks a lot it worked for me.

          Mina

          Comment

          Working...