my dog learned polymorphism
The moose likes JSP and the fly likes Communication between browsers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Communication between browsers" Watch "Communication between browsers" New topic

Communication between browsers

david allen
Ranch Hand

Joined: Sep 27, 2002
Posts: 185
I have a page call main.jsp and it has a link to a page called addUser.jsp - I wish addUser.jsp to pop up on top of main.jsp. And when the user has entered their data in addUser.jsp I want it to close and redirect main.jsp to their new account page.
How do I open a new JSP page on top of an existing one?
And how does the new page redirect the old page?
Please can someone help as the boss is waiting on this one!!!
Do I need to use javaScript
Thank you so much
bharat nagpal
Ranch Hand

Joined: Oct 26, 2002
Posts: 76
you can use javascript method to open the new browser window and with this open() method, you can modify your new browser window as per your requirements I mean to say if you don't want to include status bar, address bar etc.
and on closing of this window you can call some javascript method in the main.jsp and in that method you can write the code to will find code for help on net.
david allen
Ranch Hand

Joined: Sep 27, 2002
Posts: 185
Ok using the java script to open a new window how do i then place a form on it ie. input fields, submit buttons?
Thank you
R K Singh
Ranch Hand

Joined: Oct 15, 2001
Posts: 5382
check this page ..

"Thanks to Indian media who has over the period of time swiped out intellectual taste from mass Indian population." - Chetan Parekh
Rubal Sidhu

Joined: Aug 24, 2002
Posts: 14
Here is you solution
1.In main.jsp specify the target in <form> say tmain
2.On submitting main.jsp use function & mention target="new/child" to open adduser.jsp in new window.
3.Submit adduser.jsp to main.jsp provided the target here is tmain.
4.In main.jsp include your code that if some request is coming from adduser.jsp,redirect it to someotherpage.jsp else display main.jsp
Pseudocode for main.jsp
//show main.jsp
I hope it will work
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

Your name does not comply to the Javaranch naming policy. You can find it here. Your display names needs to be two words, you firstname, a space, then your last name. Accounts with invalid display names get deleted.
You can edit your account here
[ July 11, 2003: Message edited by: David O'Meara ]
I agree. Here's the link:
subject: Communication between browsers
It's not a secret anymore!