File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes passing value to and from popup window Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "passing value to and from popup window" Watch "passing value to and from popup window" New topic
Author

passing value to and from popup window

ashish kulkarni
Ranch Hand

Joined: Aug 15, 2002
Posts: 130
Hi,
I have to do the following
When a user clicks on a link, I want to open a jsp in
new window , i want to pass some parameters to this
jsp, which i am doing by using
<html:link href="_blank" on click="javascript opup()">
Click here </html:link>
But now i want to get value back from the popup
window, for e.g when the user clicks on some link on
this window, get the value of this link
and display it on the textfield of the first page.
Also there is one more requriement, depending upon the
value selected by the user on popup window i want to
get some extra info database, and display it on the
first page.
withour submitting the first page ( i was using
submitting to iframe before)
Ashish


A$HI$H
Jason Menard
Sheriff

Joined: Nov 09, 2000
Posts: 6450
What you need to do is name your windows and use the "target" attribute in your links. The target attribute is also available with the form tag, and will determine where the results are returned to when you submit your form.
Read this tutorial which explains how to do what you want using HTML and Javascript. You don't need to do anything different to make it work with Struts, other than use <html:link> instead of <a> for example.
This question really isn't Struts specific though, so you might be able to get a better answer in the HTML/Javascript forum.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: passing value to and from popup window