You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ajTreece <aj...@sun.com> on 2002/07/23 22:11:54 UTC

Re: Refering form variables from the JavaScript function

I do this quite a bit using JavaScript to test for (validate) user input in a 
form.  A property variable in the ActionForm acts just like a normal HTML 
element. You ca set a form variable like this:

document.{your form name}.{ActionForm property}.value = "Yadda Yadda Yadda";

Hope this helps...



Ramu, Manjukumar [PRDUS] wrote:

> Hello,
>    I have a form <html:form action="/nominationAction" > in a JSP, I am
> calling Javascript function for an event. I want to set some values of the
> parameters within the form in using Javascript.
> 
> For Ex : 
> function f1 ("value")
> {
> 	form.name = "value"
> }
> 
> Can any body tell me how to refer form variables from the JavaScript
> function in Struts based JSP?
> 
> I appreciate your help!
> 
> Thanks,
> Manju
> 
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>