473,385 Members | 1,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

refresh parent window on load of child window

Hello Experts,

i've to open child window whose content type is "application/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
May 5 '08 #1
4 5563
Velhari
46
Hello Experts,

i've to open child window whose content type is "application/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....

Expand|Select|Wrap|Line Numbers
  1. var new_window = window.open(url);
  2. do{
  3.      status = new_window.document.readyState;
  4. }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.
May 5 '08 #2
Hi,

the following code will helps....

Expand|Select|Wrap|Line Numbers
  1. var new_window = window.open(url);
  2. do{
  3.      status = new_window.document.readyState;
  4. }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
May 5 '08 #3
Hi,

the following code will helps....

Expand|Select|Wrap|Line Numbers
  1. var new_window = window.open(url);
  2. do{
  3.      status = new_window.document.readyState;
  4. }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.readyState;

}while(status != "interactive")

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

Regards
Mina
May 5 '08 #4
Hi Velhari,

Thanks a lot it worked for me.

Mina
May 5 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: MEM | last post by:
Hello, I'd like to refresh the main or top most browser window from a child window. Specifically, child popup A is opened by a main browser window then child popup B is opened from within child...
2
by: Raj | last post by:
Hi All, I have a problem with trying to refresh the parent window from child window in order to update data in the parent window. The sequence of events are 1) I click a button in the parent...
2
by: Jeronimo Bertran | last post by:
Hi, I have a page with a very data intensive grid which needs to be automatically refreshed constantly if a change is detected. In order to not refresh the complete page so often, I created an...
1
by: Earl Teigrob | last post by:
I did a ton of searching to try and find a simple solution to this issue and finally wrote my own, which I am sharing with everyone. In my searching, I did find a very complete and robust solution at...
0
by: Brad White | last post by:
Overview: I have a custom web app that has an 'Inbox' that refreshes every 30 seconds. One user uses Outlook to host the web page. Using IE, the refresh works fine. If the user is working in...
2
by: Itar | last post by:
I'm having a problem when opening an MDI Child form. I'm declaring the child form then setting the dock property to fill so that it takes up the entire space of the MDI Parent window without being...
3
by: Opa | last post by:
Hi , I have a form with javasript which launches a popup via the showModalDialog() method. I get the dialog to open, now I am trying to first get a reference to the calling form from the popup...
3
by: Natygan | last post by:
Hi, I've got a Web page which can become a parent window : some links use "window.open" to open the desired link into a new child window. This parent window has got an auto-refresh...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.