473,327 Members | 2,081 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,327 software developers and data experts.

Closing child window inParent window.

Hi Experts,

I want close child window from parent window after opening/saving text document.I don't have child window code.So no control over child window in parent. I am trying to access properties & methods of child window but getting error "Permission Denied".
Closing of child window is fine but i am not getting child window event in parent. I mean how to know that child window has completed task.

My code is as below:

Expand|Select|Wrap|Line Numbers
  1. function checkWindow() {
  2.             if (childWindow) {
  3.                 window.clearInterval(intervalID);
  4.                 childWindow.close();
  5.             }
  6.         }
  7.  
  8.   $(document).ready(function () {
  9.             if ($("#ReportUrl").val() != "") {
  10.                 var url = $("#ReportUrl").val();
  11.           debugger;
  12.                 childWindow = window.open(url);
  13.  
  14.  
  15.                 intervalID = window.setInterval(checkWindow, 500)
  16. }
This is immediately closes window. And also i don't want to use timer.

Regards,
Shilpa
Jul 25 '14 #1
4 1342
Dormilich
8,658 Expert Mod 8TB
Closing of child window is fine but i am not getting child window event in parent.
of course not. window is the endpoint of all events. everything else would be a security risk.

I mean how to know that child window has completed task.
the child window hast to notify the parent window explicitly
e.g. via https://developer.mozilla.org/en-US/...ow.postMessage
Jul 25 '14 #2
Hi Dormilich ,

Thanks for your reply.

I went through the link. But problem is that i don't have control over client script as client script is not with me.

I am just calling window.open(childurl) function in parent.


Regards,
Shilpa
Jul 31 '14 #3
Dormilich
8,658 Expert Mod 8TB
But problem is that i don't have control over client script as client script is not with me.
then you can do nothing if you cannot change the JS files.
Jul 31 '14 #4
Hi Dormilich,

Thanks for your reply.

Regards,
Shilpa
Aug 1 '14 #5

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

Similar topics

2
by: Juan Garcia | last post by:
Subject says it all. Given: Window A with text field. Window B with a button (onClick opens Window C) Window C with a button (onClick I want it to modify text fields of Window A) I have...
1
by: Filiz Duman | last post by:
Hi, I am opening a pop up window (child) from a parent window. The Child window does show a table with multiple columns and rows, each showing a value, e.g. 9 or 10 or etc. I have the values as...
2
by: dan | last post by:
This works in mozilla but I can't figure out why this won't work in IE. Say I have this html <html> header goes here header goes here
10
by: Shang Wenbin | last post by:
Hi, When I want to close the current window using window.close() in IE6.0, there will be a confirm box that: The web page you are viewing is trying to close the window. Do you want to close this...
4
by: Sileesh | last post by:
Hi I have a btn in Parent.aspx page . On server_click() of the Btn, i am opening a new window called the child.apsx window. Child window also have a Btn. On serverClick of this Btn, I perform...
22
by: stephen | last post by:
I have created an order form that users javascript to create a new html document when the customers clicks the "print page" button. Once the new document has been created it then prints the...
3
by: dibakar | last post by:
Hello I want to open a window using Window.showModalDialog once i click inside of a TextBox.And that window need to come just under the TextBox,so that it seems to a same control. So,what...
3
by: Vinutha | last post by:
Hi, I am using javascript to close my child window and after closing child window, i want to refresh parent window. So, this is the script function i am using, <script...
5
by: kalyangvd | last post by:
Hi Guys, I am trying to get the Field Id from the Parent Window in the pop up window using window.opener ex: var var1 = window.opener.document.getElementById("text1").value; ...
2
by: kurt sune | last post by:
Hello, I have a weird problem, I hope someone can explain this for me. I have a webpage using masterpage. In it I create a popup window using this code: Dim js As String = "<script...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.