Solved

Parent/Child JSP

Posted on 2014-10-06
4
451 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 500 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 500 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

Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

Question has a verified solution.

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

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Suggested Courses

739 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