Win a copy of Bad Programming Practices 101 (e-book) this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

passing value to and from popup window  RSS feed

 
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>
In my popup window i use opener.field to set the values in the first jsp
But my problem is depending upon the
value selected by the user on popup window i want to
get some extra info from database, and display it on the
first page.
withour submitting the first page
 
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when you call a pop up window, you need to make an object for it
function WindowOpen(){
NewWin=window.open(URL)
}
you reference the window from the main page by NewWin.document.FormName.ElementName.value;
You can reference the Main window from the pop up by using
parent.document.FormName.ElementName.value
 
ashish kulkarni
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am able to get the parameter from popup window,
but now my porlem is depending upon what parameter I get from the popup window, i want to get some extra information from database,
And i want to do it without submitting the first page,
I know a method using submitting to iframe, but i am nto abelt to determine at what point i must call this method, as i dont know when the popup window passes the parameter
Ashish
 
I wish to win the lottery. I wish for a lovely piece of pie. And I wish for a tiny ad:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!