Communication between browsers

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 David

you can use javascript window.open() 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 redirect.you will find code for help on net.

david allen
Ranch Hand

Joined: Sep 27, 2002
Posts: 185

posted Jul 10, 2003 01:56:00

0

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 david

David Here is you solution 1.In main.jsp specify the target in <form> say tmain 2.On submitting main.jsp use javascript.open() 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 if(request.getparameter("addusername")!=null) response.redirect("someotherpage.jsp") else //show main.jsp I hope it will work njoi

"Sidhu", 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 Thanks, Dave. [ July 11, 2003: Message edited by: David O'Meara ]