Can you do it in Javascript? something like the following:
Parent window:
<input type="button" name="preview" value="preview distribution"
onclick="openPopup();" >
Popup window
<script language="javascript">
// getting multiple selected values from opener
// set selected values (will be a list) to hidden form field
// document.forms[0].multiSel1.value=
setTimeout(submitForm, 1000);
submitForm() {
document.forms[0].submit;
}
</script>
<form action="previewAction" method="post">
<input type="hidden" name="multiSel1" value="">
<input type="hidden" name="multiSel2" value="">
<input type="submit" name="go" value="Submit">
</form>
Hope it'll work,
Saul
----- Original Message -----
From: "Rick Reumann" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <user@struts.apache.org>
Sent: Thursday, June 15, 2006 12:42 PM
Subject: Advice on hanlding multi-select options that need a regular submit
on form, plus a submit to popup window
I'm looking for advice on how to best handle this situation.
I have a form with several multi-select drop downs. There is a typical
submit button that submits the form. What I also have is another
button within the form called "preview distribution" which needs to
take the data on the form and up processing it and displaying it on a
popup window.
If it were just a few regular params i'd just create url link and pass
in through javascript the params as a get request. In this case, since
there are several multi select options, it would seem easier to submit
the whole form but in this case the target would need to change for
the form (and then would also have to change back so that the regular
submit works).
I'll google around, but if anyone has some code to share that does
something like the above, I'd love to see it (Or possibly another work
around that doesn't involve rewriting the form's target property).
Thanks,
--
Rick
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------
Spam/Virus scanning by CanIt Pro
For more information see
http://www.kgbinternet.com/SpamFilter.htm
To control your spam filter, log in at
http://filter.kgbinternet.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]