Ryan

It is interesting that you should be working on this.. I have a similar 
requirement - I need to forward to a NAMED page once my action has completed - 
I do not know which page prior to form submittal. from what I have read so far, 
there is no 'struts' solution - you have to use Javascript.

I have not tried yet - but I suspect your problem is with the html:form element 
- try changing name="processMainForm" to method="processMainForm"

db


-----Original Message-----
From: Ryan julius [mailto:[EMAIL PROTECTED]
Sent: 13 December 2004 13:45
To: [EMAIL PROTECTED]
Subject: Form submission and javascript


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 !
======================================================= 
This message has been scanned for viruses and dangerous 
content using Vet Anti-Virus Protection and is believed 
to be clean. 
=======================================================

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

Reply via email to