Form Name is the same as "name" attribute of corresponding action mapping (/timelog here) in struts-config.xml.
Thanks. - Vinay -----Original Message----- From: Firat TIRYAKI [mailto:[EMAIL PROTECTED] Sent: Monday, June 23, 2003 3:03 PM To: Struts Users Mailing List Subject: Re: accessing form element in javascript use the below statement. javascript has an array object of forms document.forms[0].age.value; F. ----- Original Message ----- From: "Gemes Tibor" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Monday, June 23, 2003 12:25 PM Subject: Re: accessing form element in javascript > Frances Aleah Z. de Guzman �rta: > > >how can i access the values of my form elements using javascript in struts? > >example.... > ><html:form action="/timelog" onsubmit="return submitForm()"> > > <html:text property="name"/> > > <html:text property="age"/> > > <html:submit property="action">Log</html:submit> > ></html:form> > > > >how can i access the value of the textbox "age"? before im putting like this > >in my javascript...."document.frmName.age.value"....but there is ni form name > >in the html:form, right? > > > > > Check the generated html. (you'll find that the form name corresponds to > the name attribute) > > Tib > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.491 / Virus Database: 290 - Release Date: 6/18/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.491 / Virus Database: 290 - Release Date: 6/18/2003 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

