Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

parent window open child window

Tags:

javascript

jsp

I want a page that open child window. The child window will be redirect to other website for processing. The other website will send the result to our server by redirect on the child window.our server will process the result and return to parent window and close the child window. Can it be done and how?

like image 410
muhdazmilug Avatar asked Dec 04 '12 12:12

muhdazmilug


People also ask

How do I stop refreshing parent page when child opens window?

Set a flag once child window is open and unset it once its closed. In ShowPopup use event. preventdefault() if child window is open!

How do I view the parent window variable in a child window?

You just need to prefix “ window. opener. ” and write the same code that you will write in the parent window's HTML page to access its elements.

How do I transfer data from child window to parent window?

From a child window or a small window once opened, we can transfer any user entered value to main or parent window by using JavaScript. You can see the demo of this here. Here the parent window is known as opener. So the value we enter in a child window we can pass to main by using opener.

What does a child window mean?

A child window is a window that is launched and contained inside of a parent window. By definition, a child window is one that is dependent on a parent window and is minimized or closed when the parent minimizes or closes.


1 Answers

  1. You use window.open method to open a child window and store the returned reference to interact with it later.
  2. You use the window.parent property from the child window to access the parent window.

Here is an article demonstrating the approach.

like image 130
MD Sayem Ahmed Avatar answered Sep 20 '22 15:09

MD Sayem Ahmed