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
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

Problem with pop-up window

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi all

I have a problem with pop-up window.

When I click a button I need to open a pop-up window and I need to return some values from the pop-up window to main window.

I have 3 list boxes in pop-up window I am populating them with the values from database. For 2 of them I am directly including 2 jsp files to get values in them but the problem is with the 3rd list box in which I have to get values based on the values in the 2 list boxes. I am trying to get values in the 3rd list box using a javascript function on "onblure" event of the 2nd list box. This function will invoke a controller jsp and returns values as ArrayList to the pop-up window. Here I am getting values in the 3rd list box, but I am getting a new pop-up window i.e., now I am having 2 pop-up windows opened as a result of page refresh while submitting the values of the two list boxes to a controller jsp page.

Even I am getting values in 3rd list box in the newly opened pop-up window but not in the already opened pop-up window. When I am closing the newly opened pop-up window I am again left with 3rd list box empty in my original pop-up window.

This is my code to invoke the pop-up window:


and when I invoke this function control is transferred to viewoptns.jsp where I am retrieving values from database into form elements like listbox and upon selecting appropriate values in those list boxes I need to return
them to the calling function; for which I am using window.returnValues method.


Can anyone guide me how to avoid opening the new pop-up window..
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
  • Report post to moderator
Sree,

Popup windows are generated on the client.
Moving to Http/Javascript where client side code is discussed.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Report post to moderator
Do not cross post, it is a waste of people's time....

closing this topic....

talked about here: https://coderanch.com/t/118480/HTML-JavaScript/pop-up-window

Eric
 
Straws are for suckers. Now suck on this tiny ad!
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!