How to get a session variable for the state of the child page created from the parent page. Is there a session variable or something which waits for the child to exit?
You may look into using session variables, the following article describes how to set them and provides an example https://www.ptc.com/en/support/article?n=CS249180