You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jose Maria Tristan <jt...@sedasolubles.com> on 2006/03/29 11:48:40 UTC

Struts with javascript

Hi:

	I have a text: <html:text property="cadenaDesdeText" maxlength="10"/>.
	I need use this control in a function of javascript.
	Por example
	function showText(){
		alert(cadenaDesdeText);
	}
	How can i use any control of struts into a function? How i can refer to the
name of the control?

	Thank you.


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


RE: Struts with javascript

Posted by José María Tristán <jt...@sedasolubles.com>.
ok.

Thank you very much.

-----Mensaje original-----
De: Deepa Khetan [mailto:deepa.khetan@gmail.com]
Enviado el: miércoles, 29 de marzo de 2006 11:55
Para: Struts Users Mailing List
Asunto: Re: Struts with javascript


When the HTMl page is rendered on screen, all the struts controls are
rendered as normal HTMl controls. So u can refer them as document.forms
[0].cadenaDesdeText.value.

On 3/29/06, Jose Maria Tristan <jt...@sedasolubles.com> wrote:
>
> Hi:
>
>        I have a text: <html:text property="cadenaDesdeText"
> maxlength="10"/>.
>        I need use this control in a function of javascript.
>        Por example
>        function showText(){
>                alert(cadenaDesdeText);
>        }
>        How can i use any control of struts into a function? How i can
> refer to the
> name of the control?
>
>        Thank you.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


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


Re: Struts with javascript

Posted by Deepa Khetan <de...@gmail.com>.
When the HTMl page is rendered on screen, all the struts controls are
rendered as normal HTMl controls. So u can refer them as document.forms
[0].cadenaDesdeText.value.

On 3/29/06, Jose Maria Tristan <jt...@sedasolubles.com> wrote:
>
> Hi:
>
>        I have a text: <html:text property="cadenaDesdeText"
> maxlength="10"/>.
>        I need use this control in a function of javascript.
>        Por example
>        function showText(){
>                alert(cadenaDesdeText);
>        }
>        How can i use any control of struts into a function? How i can
> refer to the
> name of the control?
>
>        Thank you.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>