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 !