Re: Restric the values in S:TextFields.

2008-02-27 Thread Jeromy Evans
Sanjeewa Saman wrote: Thank you very much Jeromy , It works I used the java Scripts for this to validate in client side. You're welcome. Depending on how important the data is and how public the site is, also consider validating it on the server-side in case of users without javascript an

RE: Restric the values in S:TextFields.

2008-02-27 Thread Sanjeewa Saman
Thank you very much Jeromy , It works I used the java Scripts for this to validate in client side. sanjeewa -Original Message- From: Jeromy Evans [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 27, 2008 1:44 PM To: Struts Users Mailing List Subject: Re: Restric the values in

Re: Restric the values in S:TextFields.

2008-02-27 Thread Jeromy Evans
On the server-side, use an expression validator to ensure the input contains only valid characters. On the client-side either: - use ajax validation; or - use a javascript function that listens for the keypress event and rejects invalid keystrokes As usual, the javascript keypress event on IE

Re: Restric the values in S:TextFields.

2008-02-26 Thread Laurie Harper
Chris Pratt wrote: On Tue, Feb 26, 2008 at 10:49 PM, Sanjeewa Saman <[EMAIL PROTECTED]> wrote: Hi all , Can some body please tell me a way to restrict the data that we can eneter to a textfield in struts2. What I wanted to do is , for the s:textfield , I need to enter only values these valu

Re: Restric the values in S:TextFields.

2008-02-26 Thread Chris Pratt
On Tue, Feb 26, 2008 at 11:12 PM, Sanjeewa Saman <[EMAIL PROTECTED]> wrote: > Yes Chris , that can be done using JS , But I thought that there should be a > way in struts2 to that. > May be some one have an idea of doing it.If so pls give ur idea to us. > I'm not sure what you think Struts can do

RE: Restric the values in S:TextFields.

2008-02-26 Thread Sanjeewa Saman
:29 PM To: Struts Users Mailing List Subject: Re: Restric the values in S:TextFields. On Tue, Feb 26, 2008 at 10:49 PM, Sanjeewa Saman <[EMAIL PROTECTED]> wrote: > Hi all , > Can some body please tell me a way to restrict the data that we can eneter > to a textfield in struts2. >

Re: Restric the values in S:TextFields.

2008-02-26 Thread Chris Pratt
On Tue, Feb 26, 2008 at 10:49 PM, Sanjeewa Saman <[EMAIL PROTECTED]> wrote: > Hi all , > Can some body please tell me a way to restrict the data that we can eneter > to a textfield in struts2. > > What I wanted to do is , for the s:textfield , I need to enter only values > these values {1-10 ,

Restric the values in S:TextFields.

2008-02-26 Thread Sanjeewa Saman
Hi all , Can some body please tell me a way to restrict the data that we can eneter to a textfield in struts2. What I wanted to do is , for the s:textfield , I need to enter only values these values {1-10 , +,-,.} . Thank you. sanjeewa