Solved

Open a new window from a jsp page

Posted on 2003-12-05
11
419 Views
Last Modified: 2010-04-01
hello,

i create a web application in jsp with servlet. i want to open a new window from one of my pages when there is a click on a button. i want to have both windows on my screen : the first one which calls the other and the new one. i may send parameters to the second window and i get results from this window.
is it possible to do that ? if it is, how should i do ?
0
Comment
Question by:sroz
  • 3
  • 2
  • 2
  • +2
11 Comments
 
LVL 15

Expert Comment

by:jimmack
ID: 9882767
You mean that you want the first window to open a second window and then when you type things in to fields on the second window, results are displayed on the first?

No it's not possible.  Each window (browser instance) has to request data from the server, so the server can't "push" information to the window.

I suppose you could do it by getting the page on the second window to auto-refresh, but it's probably not quite what you want (and it's not a very good solution).
0
 

Author Comment

by:sroz
ID: 9882878
i have a window with inputs to create PERSON. one of the field(COUNTRY) is a foreign key and i want to put a button to help users. when they click on the button, i open a new window with the list of all countries there are in the database. the list is an array. when then select one line by clicking on it, i want to put the name of the country in my first window and close the second one. i have an aspx model where it's done but i don't manage to translate it into jsp.
0
 
LVL 27

Expert Comment

by:rrz
ID: 9882993
I am reading the question differently than jim.  
I think yes, there is a solution, but it is a javascript solution and not JSP.

window.open("yourSecondPage.jsp?person=john",....................  

Please address jim's  comment and give more info, then we can sort this out.

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 14

Expert Comment

by:kennethxu
ID: 9883030
It's not straightforward, but I too think it is possible with javascript. have a look at this:
http://www.experts-exchange.com/Web/Web_Languages/JSP/Q_20682698.html
and let us know if you have further enquires.
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 9883040
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9883088
We're all on the same track now ;-)

I also think the solution you want is probably best done with JavaScript (I understand the capabilities, but not the technicalities).

The other alternative would be to populate a drop down list for the country and just use this instead of a popup.
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 10658635
suggestions was given by a number of members. asker never follow up, then ask for delete with no reason.

I would recommend: points to rrz
0
 

Author Comment

by:sroz
ID: 10658679
sorry, i didn't remember this question and i don't know what i did about this. i stopped programming with jsp, now i only do sql. so i'm not sure i can give points.
0
 
LVL 27

Expert Comment

by:rrz
ID: 10658833
>so i'm not sure i can give points  
If that is the case, then  Ok  
>- PAQ-ing the question and refunding points
0
 

Accepted Solution

by:
PashaMod earned 0 total points
ID: 10694366
Closed, 200 points refunded.
PashaMod
Community Support Moderator
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In previous parts of this Nano Server deployment series, we learned how to create, deploy and configure Nano Server as a Hyper-V host. In this part, we will look for a clustering option. We will create a Hyper-V cluster of 3 Nano Server host nodes w…
This article summaries thoughts and ideas from two years of sustained use. It provides good reasoning to make the jump to Windows 10.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question