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?
Set a flag once child window is open and unset it once its closed. In ShowPopup use event. preventdefault() if child window is open!
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.
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.
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.
Here is an article demonstrating the approach.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With