aspose file tools*
The moose likes Struts and the fly likes passing the values from popup window to jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "passing the values from popup window to jsp" Watch "passing the values from popup window to jsp" New topic
Author

passing the values from popup window to jsp

Swathi Prakash
Ranch Hand

Joined: Jan 18, 2005
Posts: 49
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
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
you can set data for display into session scope.


SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4462
    
    6

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.


Junilu - [How to Ask Questions] [How to Answer Questions]
Liz Brown
Ranch Hand

Joined: Oct 22, 2002
Posts: 112
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
Bartender

Joined: Feb 26, 2001
Posts: 4462
    
    6

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 agree. Here's the link: http://aspose.com/file-tools
 
subject: passing the values from popup window to jsp