• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

getting values from popup

 
Ranch Hand
Posts: 325
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
friends
I need ur help on this
I have a JSP with some text boxes.. To fill some data in these boxes, I have to click on a button , which inturn opens a pop-up window, and I will select some data there in the pop-window. Once I selct some data in pop-up , teh data should come to parent window and close teh pop-up..
Cansome one throe some lihgt on this..
thanks for ur help
Regards
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
this is a javascript question.
You will not find a solution on this forum.
You have to search in a javascript forum.
In your popup window you will have to add onChange to your struts tag.
This must call a function which sets the value of the selected drop down in the field of the main window (see window.opener).
function xxx()
{
var selDropDownValue = document.forms[0].elements['yyy.x'].options[document.forms[0].elements['yyy.x'].selectedIndex].value;
//get selected drop down value
window.opener.document.forms[0].elements['xxx.z'].value = selDropDownValue;
//to set the value of the in the main window
window.close();
// to close the current window
}
Hope this helps you.
 
manasa teja
Ranch Hand
Posts: 325
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Nathalie Keymeulen:
Hi,
this is a javascript question.
You will not find a solution on this forum.
You have to search in a javascript forum.
In your popup window you will have to add onChange to your struts tag.
This must call a function which sets the value of the selected drop down in the field of the main window (see window.opener).
function xxx()
{
var selDropDownValue = document.forms[0].elements['yyy.x'].options[document.forms[0].elements['yyy.x'].selectedIndex].value;
//get selected drop down value
window.opener.document.forms[0].elements['xxx.z'].value = selDropDownValue;
//to set the value of the in the main window
window.close();
// to close the current window
}
Hope this helps you.


Thanks Nathalie!!!
I did this already .. in slightly different method..
IF somenbody need any help on similar problem, please let me know.. i can help you on this!!
 
Ranch Hand
Posts: 516
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have the same problem.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic