File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Form in New window Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Form in New window" Watch "Form in New window" New topic

Form in New window

sachin pachpute
Ranch Hand

Joined: Aug 05, 2004
Posts: 35
I have 'Update' button on jsp page on click of which I am opening a new window( parent form is not submitted). I am not specifying exact jsp path for new window but 'campaign\'. Action Class which will handle this request is different than Action Class for the parent window but Action Form is common for both.

I need form values which are there in parent window to be available in the Action class that is handling request for opening new window. Is it possible? I am just one year experienced so can you help me in this?

my java script code is,

var sUrl = '<html:rewrite page="/campaign/"/>';
var sName ='UPDATE_PROJECT';
var oParentWindow =window;
var iWidth =400;
var iHeight =350;
var scroll =0;

if ( !sUrl || !oParentWindow )
var xPos = oParentWindow.screen.width / 2 - iWidth / 2;
var yPos = oParentWindow.screen.height / 2 - iHeight / 2;

var sFeatures = 'width='+ iWidth + ',' + 'height=' + iHeight + ',';
sFeatures += 'left='+ xPos + ',' + 'top=' + yPos;
sFeatures += ',scrollbars=' + (scroll == 0 ? '0' : '1');

var oDialog =, sName, sFeatures, false);
if ( oDialog )
[ September 25, 2006: Message edited by: sachin pachpute ]
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Moved from JSP to HTML/Javascript.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: Form in New window
It's not a secret anymore!