• 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

passing value to and from popup window

 
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic