If I'm understanding your question properly, the easiest way is just to add the 
attribute target="_new" in your <form> tag.  I don't know how that translates 
to the Struts <form> tag as I tend to not use Struts tags, but for a plain-jane 
<form> tag, it should get the job done.

I have heard that the target attribute is no longer valid HTML, but I haven't 
bothered to look up if that's accurate or not.  Even if it is, I doubt any 
browser won't support it these days, although in the future who knows.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Mon, December 13, 2004 8:45 am, Ryan julius said:
> Hello,
> 
> I am trying to submit a form to an action, with the resulting page
> displayed in a child window.
> 
> <script  LANGUAGE="JavaScript" TYPE="text/javascript">
> function toChildWondow(actionName, methodeAppelee, form, nomFenetre,
> largeur, hauteur ) {
>  var windowFeatures =
> "scrollbars=yes,resizable=no,width="+largeur+",height="+hauteur;
>  var sUrl =
> '<%=request.getContextPath()%>'+"/"+nomAction+"?dispatch="+methodeAppelee;
>  alert("sUrl : "+sUrl);
>  popUp = window.open("","nomFenetre",windowFeatures);
>  alert("document.form : "+form);
>  popUp = window.open("",nomFenetre,windowFeatures);
>  form.target='nomFenetre';
>  form.action='sUrl';
>  form.submit();
>  popUp.focus();
> }
> </script>
> <html:form action="/ProcessMainAction.do" name="processMainForm"
> type="com.inet.form.ProcessMainForm">
>    <html:link
> href="Javascript:toChildWindow('ProcessMainAction.do','doDataProcess',
> 'this.form', 'myChildWindow',200, 400)">
>       <html:img page="/icones/idClient.gif" width="26" height="25"
> border="0"/>
>    </html:link>
> </html:form>
> ======================
> ======================
> <html:form action="/ProcessChildAction.do" name="processChildForm"
> type="com.inet.form.ProcessChildForm">
>    <html:link
> href="Javascript:toChildWindow('ProcessChildAction.do','doDataProcess',
> 'this.processChildForm', 'myChildWindow',200, 400)">
>       <html:img page="/icones/idClient.gif" width="26" height="25"
> border="0"/>
>    </html:link>
> </html:form>
> ========================
> ========================
> I have the following error on form.submit(); "This object can not manage
> this property or mathod"
> Please tell me what is wrong with that Javascript.
> What is the easy way of submitting a form and display the forwarded page
> to a child window.
> Thanks.
> 
> 
> ---------------------------------
>  D?couvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos
> mails !
> Cr?ez votre Yahoo! Mail
> 
>   Avec Yahoo! faites un don et soutenez le T?l?thon !

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

Reply via email to