Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Parent/Child JSP

Posted on 2014-10-06
4
Medium Priority
?
498 Views
Last Modified: 2014-10-13
I have request to create a parent JSP And from there I need to open a popup window(another JSP) and disable parent window and what ever I select it need to carried to parent window closing the child window.

Please let me know the best way to do this.

First Action Class - will bring First JSP and clicking search button (Second Action) should open pop up JSP and in POP up if we select some thing that need to be populated in parent JSP(With out calling the first action )
0
Comment
Question by:nzdjava
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 21

Assisted Solution

by:Amitkumar Panchal
Amitkumar Panchal earned 2000 total points
ID: 40365208
Try the following out.

1, Add java script functions to the parent jsp.
var popupWindow=null;

// function to open child window
function popup() {
    popupWindow = window.open('child_page.html','name','width=200,height=200');
}

// function to disable parent window. This will be called when pop-up is opened and trying to access parent window
function parent_disable() {
    if (popupWindow && !popupWindow.closed) {
        popupWindow.focus();
    }
}

Open in new window


2, Call java script functions on onFocus or onClick of parent window. This is again in parent jsp
<body onFocus="parent_disable();" onclick="parent_disable();">

Open in new window


Hope this helps.
0
 

Author Comment

by:nzdjava
ID: 40366947
Thanks.
If a value got selected in child window(child JSP) that value need to be populated on parent window with out refreshing the parent JSP
0
 
LVL 21

Accepted Solution

by:
Amitkumar Panchal earned 2000 total points
ID: 40369045
If a value got selected in child window(child JSP) that value need to be populated on parent window with out refreshing the parent JSP

EE already has solution to this. Please refer http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28057344.html
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question