aspose file tools*
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Form in New window" Watch "Form in New window" New topic
Author

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\updateCampaign.do'. 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/updateArticle.do"/>';
var sName ='UPDATE_PROJECT';
var oParentWindow =window;
var iWidth =400;
var iHeight =350;
var scroll =0;

if ( !sUrl || !oParentWindow )
return;
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 = oParentWindow.open(sUrl, sName, sFeatures, false);
if ( oDialog )
{
oDialog.focus();
}
[ September 25, 2006: Message edited by: sachin pachpute ]
Ben Souther
Sheriff

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: http://aspose.com/file-tools
 
subject: Form in New window
 
Similar Threads
Command pattern
Popup form, parent form
opening new window
Page section does not update after call of a4j:support in IE 9
submit form of child window and show the new screen in parent window.