>Any ideas on how I can get the data from the main page, through the 
>struts form, up \
into the pop-up window for display *before* submitting the main page? <

As an alternative to javascript passings, you could actually submit the
form to another window, using the "target" attribute of forms.  It's
normal use is to submit forms to different windows in a frameset, but it
can work in this case, as well.  (I just ran through this quickly, and
have not checked this against every browser, but something like this
should work):

Main page form (you can and probably should use html:form, which also
has a target attribute):

<form action="editConfrim.do" target="_confirm"
onSubmit="window.open('', '_confirm', 'width=200,height=200');"> ...
</form>

This will submit your form to a child pop-up window, where the onSubmit
sets the window's properties.  The form in the child window would be:

<form action="finalStep.do" target="_mainWindow"
onSubmit="window.close()">
...your business logic-adjusted form fields...
</form>

Or, if you do not want to hard-code the name of the main window in the
form, you can use this:
<script>document.forms[0].target=window.opener.name</script>

The catch here is that the main window has to be named *SOMETHING*, or
the child window will not know which window to submit back to.  Probably
the best way to do this would be to have that first form in a frameset,
even a dummy frameset, to ensure it has a name when the user submits the
form.  Otherwise, a workaround like:

<body onLoad="self.window.name="_mainWindow">

On the main form page seems to work as well, but somehow strikes me as
less reliable.

-Greg



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to