• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Bear Bibeault
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Jj Roberts

passing value to and from popup window

 
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
 
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.
 
Nothing up my sleeve ... and ... presto! A tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic