Subject: Re: Accessing form properties in Javascript From: "Matt Raible" <[EMAIL PROTECTED]> === You can use document.formName.property - where formName is the name you specify in your action mapping (the name of the form-bean).
Struts is only helps to produce HTML - you can always "view source" to see what form names are and such. Matt "Bhaskar Gopalan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]... > Without struts,it's simple. > > Inside javascript function: > document.formName.property. > > How to do it when using struts? > > Thnx, > GB > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, March 26, 2002 4:39 PM > To: Struts Users Mailing List > Cc: [EMAIL PROTECTED] > Subject: Re: Accessing form properties in Javascript > > > > Perhaps someone else can correct me. I don't believe you can access this > within JavaScript since JavaScript is "client side" and forms are > server-side... > > You could preload hidden properties from a form selection and then access > them thru JavaScript.... > > I had to set a form's propery thru JavaScript and I had to have the > javascript method invoke a JSP page which included the form bean in order > to get this done. > > I'm curious if there's a better way. > > thanks, > Theron > > > > > > Bhaskar Gopalan > > <bgopalan@adapt To: > [EMAIL PROTECTED] > intel.com> cc: > > Subject: Accessing form > properties in Javascript > 03/26/02 01:24 > > PM > > Please respond > > to Struts Users > > Mailing List > > > > > > > > > Hi, > how do i get and set form properties inside a javascript function? Do I > have > to use > any ref to the Form Bean? > > Thnx, > GB > > -- > To unsubscribe, e-mail: < > mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: < > mailto:[EMAIL PROTECTED]> > > > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

