struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark <markl...@libero.it>
Subject Re: how to give form name in struts?
Date Wed, 18 Dec 2002 13:55:33 GMT
If you view the source the form renders as haveing the name of the formbean
that you define in struts-config.xml..

You can make you js functions more portable by feeding them the form name
when you call them. This way you don't need the form name. I prefer to use
document.form[myform] rather than document.myform because in reality you are
accessing an array.


Function myfunction(form) {
    document.forms[form].etc
}


<form onsubmit="myfunction(this.form)">

Hope this helps mark


On 18-12-2002 13:49, "shirishchandra.sakhare@ubs.com"
<shirishchandra.sakhare@ubs.com> wrote:

> check documentation for html:form tag...
> 
> -----Original Message-----
> From: Mohammed.Rafeeq [mailto:Mohammed_Rafeeq@Satyam.com]
> Sent: Wednesday, December 18, 2002 1:44 PM
> To: struts-user
> Subject: how to give form name in struts?
> 
> 
> hi all ,
> i'm a newbie.
> 
> how to give the form name when using  struts-html.tld
> 
> <html:form action="/saveSubscription" focus="host">
> 
> 
> i want to submit the form on click of a link, i thought of calling
> javascript:document.formname.submit() onclick of the link
> 
> 
> but in struts syntax is there provision to specify the form name?
> 
> 
> -rafeeq
> 
> 
> **************************************************************************
> This email (including any attachments) is intended for the sole use of the
> intended recipient/s and may contain material that is CONFIDENTIAL AND
> PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
> distribution or forwarding of any or all of the contents in this message is
> STRICTLY PROHIBITED. If you are not the intended recipient, please contact
> the sender by email and delete all copies; your cooperation in this regard
> is appreciated.
> **************************************************************************
> 
> --
> To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>
> 
> 


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message