You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by red dog <re...@yahoo.com> on 2009/09/12 21:16:18 UTC

scripting paramaters passed as parameters

Hello,
 
I'm new to this mailing list although I'm using Struts2 for quite some time. I am stuck right now and I decided to ask a quick question:
 
Is it possible to generate an input field (as well as any other fields) by passing an onclick event for example as parameter? It doesn't seem to be working for me... I'm using Struts2.1.6 + freemarker as you can see bellow.
 
<@s.textfield theme="simple" name="name1" id="id1" cssClass="textfield" value="value1">
<@s.param name="onclick" value="myjsfunction();" />
</...@s.textfield>
 
Thank you.


      

Re: scripting paramaters passed as parameters

Posted by Tommy Pham <to...@yahoo.com>.
--- On Sat, 9/12/09, red dog <re...@yahoo.com> wrote:

> From: red dog <re...@yahoo.com>
> Subject: Re: scripting paramaters passed as parameters
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Date: Saturday, September 12, 2009, 3:17 PM
> First of all the subject should've
> read "scripting events passed as parameters". 
>  
> I'm now responding to my own question :) - this will do
> it - not sure if this is a bug in Struts2 or not though:
>  
> <@s.textfield theme="simple" name="name1" id="id1"
> cssClass="textfield" value="value1">
> <@s.param
> name="onclick">myjsfunction();</...@s.param>
> </...@s.textfield>
> 

What's wrong with <@s.textfield theme="simple" name="name1" id="id1" cssClass="textfield" value="value1" onclick="myjsfunction();" /> ?


> 
> --- On Sat, 9/12/09, red dog <re...@yahoo.com>
> wrote:
> 
> 
> From: red dog <re...@yahoo.com>
> Subject: scripting paramaters passed as parameters
> To: user@struts.apache.org
> Date: Saturday, September 12, 2009, 12:16 PM
> 
> 
> Hello,
>  
> I'm new to this mailing list although I'm using Struts2 for
> quite some time. I am stuck right now and I decided to ask
> a quick question:
>  
> Is it possible to generate an input field (as well as any
> other fields) by passing an onclick event for example as
> parameter? It doesn't seem to be working for me... I'm using
> Struts2.1.6 + freemarker as you can see bellow.
>  
> <@s.textfield theme="simple" name="name1" id="id1"
> cssClass="textfield" value="value1">
> <@s.param name="onclick" value="myjsfunction();" />
> </...@s.textfield>
>  
> Thank you.
> 
> 
>       
> 
> 
>       

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


Re: scripting paramaters passed as parameters

Posted by red dog <re...@yahoo.com>.
First of all the subject should've read "scripting events passed as parameters". 
 
I'm now responding to my own question :) - this will do it - not sure if this is a bug in Struts2 or not though:
 
<@s.textfield theme="simple" name="name1" id="id1" cssClass="textfield" value="value1">
<@s.param name="onclick">myjsfunction();</...@s.param>
</...@s.textfield>


--- On Sat, 9/12/09, red dog <re...@yahoo.com> wrote:


From: red dog <re...@yahoo.com>
Subject: scripting paramaters passed as parameters
To: user@struts.apache.org
Date: Saturday, September 12, 2009, 12:16 PM


Hello,
 
I'm new to this mailing list although I'm using Struts2 for quite some time. I am stuck right now and I decided to ask a quick question:
 
Is it possible to generate an input field (as well as any other fields) by passing an onclick event for example as parameter? It doesn't seem to be working for me... I'm using Struts2.1.6 + freemarker as you can see bellow.
 
<@s.textfield theme="simple" name="name1" id="id1" cssClass="textfield" value="value1">
<@s.param name="onclick" value="myjsfunction();" />
</...@s.textfield>
 
Thank you.