Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

passing value to and from popup window

 
ashish kulkarni
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic