• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

passing the values from popup window to jsp

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i want to get the value from popup window to jsp page . i am uaing html:link in popup window. if i click the link the value should me displayed in the jsp page. in the same time , the popup window should be closed.how can i do this? please help me.



Thanks in Advance

Swathi
 
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you can set data for display into session scope.
 
Sheriff
Posts: 17734
302
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Most implementations I have seen do this via JavaScript. For examples, see the "Pop-up Picker" example here

Setting data in the session is something I would not recommend doing in this situation. You'd have to submit the data in the popup window, then force the parent window to refresh itself. Not pretty.
 
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI,
I have a jsp page(jsp1) with 4 text fields and 3 buttons at bottom.

3 of the text fields have images next to them.
For example: for 1 text field, when user clicks on that image next to it(in jsp1), a jsp page(jsp2) pops up with some information. User clicks on the name from the list by selecting radio button there and presses 'select' on that pop up jsp2 page. After select is pressed the name chosen is to be displayed in the text box of jsp1. Any idea how to do this?
 
Junilu Lacar
Sheriff
Posts: 17734
302
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Liz Brown:
Any idea how to do this?



I always cringe a little when I see statements like "a JSP page pops up". You have get it clear in your mind that a JSP is really just a convenient way of writing a servlet. As such, a JSP page never pops up because a servlet doesn't pop up. Servlets and JSPs are server-side components. A popup window is a client side entity. Ne'er the twain meet. I prefer to say you "bring up a JSP in a popup window" or to be more technically correct, you "bring up the results of invoking a JSP in a popup window" but that's a little too wordy.

At any rate, the solution to your problem would be the same as the one I pointed out above.
 
I promise I will be the best, most loyal friend ever! All for this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic