This week's book giveaway is in the OCP forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 11 Developer Practice Tests and have Scott Selikoff and Jeanne Boyarsky on-line!
See this thread for details.
Win a copy of OCP Oracle Certified Professional Java SE 11 Developer Practice Tests this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
Sheriffs:
  • Devaka Cooray
  • paul wheaton
  • Mark Herschberg
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
Bartenders:
  • Carey Brown
  • salvin francis
  • Piet Souris

Popup to parent communications

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a form:
form name is "name" ...it has a link which opens a popup window to search names from the database starting from any alphabet...
in the popup window ..user will key in values and hit "search" and it will post to itself with the search results. And from the resulting values, user will select one from the drop-down list. I want that selected value passed back to name with the details of the repective name.
Till now i am successful in opening a popup window and searching names from the database and it also lists in drop down list retrieving from database.
But when i click a particular name and click on submit all the values get displayed on the same window ...whereas i want the popup window to close and details to display on main window...!!..All this is done in jsp..!!
I would be grateful to anyone who helps me...since i am trying this very hard...
[ November 19, 2003: Message edited by: Bear Bibeault ]
 
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hai,
before submiting the child window you close the window using self.close and then submit.do the necessary things in the class and then redirect to the main page,which you want to show the results.hope i am clear,or pls let me know.
jyothsna
 
Sheriff
Posts: 67498
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The actions of communicating between the popup window and its parent, as well as closing the popup, must be performed on the client side through the use of Javascript. As such, I'm moving this along to the HTML/Javascript forum.
I also changed the topic subject to something more appropriate. (rose, your posts will get more attention if you give them meaningful subjects)
bear
 
rose hegde
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am sorry but i did not get it...pls tell in detail.
Thanx
 
Bear Bibeault
Sheriff
Posts: 67498
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Within your popup, you have access to the parent window through the opener variable. You can use this access to cause actions to happen within the parent from your popup. If you need a reference, I highly recommend this book.
Try your hand at writing some code to perform the operations you are after and we'll all be glad to help you with the points you are getting stuck on.
bear
[ November 19, 2003: Message edited by: Bear Bibeault ]
 
rose hegde
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have tried a lot and i am stuck ...From a jsp page i call a popup window...which has a search field...where in i enter amy alphabet and names starting from that letter get displayed in a list box...when i click on a particular name and press submit...all the details of that name get displayed on the same popup page where as i want to display it in the main page...How to pass the value thru a submit button from popup window to main window..!!???
PS : If i search a full name and when only one name is displayed...thru the help of a href link...i wrote a function loadinparent and that name values are all displayed in the main window..In this case its not working if there r more than one name in the list...!!!
Now can u help me?
 
Bear Bibeault
Sheriff
Posts: 67498
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We probably need to see the code that you have already written to understand where you want to take this.
Unfortunately, starting tomorrow I'm am going to be out-of-touch for about a week... but there are a lot of smart people who post in this forum and should be able to help you along... you just need to show what you've got so far, and describe what's not working for you.
And here's a nudge in the right direction: you cannot submit a request to the popup and expect the results to appear in the parent. You must submit to the parent in the first place if that's where you are expecting the response. You should examine exactly where your processing is occuring, and make sure that it's targetted at the appropriate window.
bear
[ November 20, 2003: Message edited by: Bear Bibeault ]
 
rose hegde
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am posting the code...u r here today and u can help me today...Pls..
My first page is...
emp_update.jsp
---------------------

------------------
Now when i press submit.(or by link)..i get the values displayed in the same page..!!
Retriving and all at backend i have done in java..!!!
Can u help me now???
[edited code so people can read it!:Eric]
REMEMBER TO TURN SMILES OFF!
[ November 20, 2003: Message edited by: Eric Pascarello ]
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
if you want to load in the parent you need to not use self!
window.opener.location.href = BLAH;
 
The overall mission is to change the world. When you've done that, then you can read this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic