Javascript style we have used for validating alphanumeric and spaces are not allowed

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Javascript style we have used for validating alphanumeric and spaces are not allowed

Raghu Chandra
Hi.,

i am raghu here, can any one please tell me what is the widget-style ="" we
will use
for validating only alphanumeric non space.


Thank you.

- Raghu
Reply | Threaded
Open this post in threaded view
|

Re: Javascript style we have used for validating alphanumeric and spaces are not allowed

SAURABH SINGH
If you are using in the script .
use thi function

function alphanumeric(value,field){
        var alphaExp = /^[0-9a-zA-Z]+$/;
        var input = alphaExp.test(value);
        if(value == "")
        {
            return true;
        }
        if(input == true)
        {
            return true;
        }
        else
        {
            alert(field);
            return false;
        }
    }

On Wed, Jul 11, 2012 at 4:26 PM, Raghu Chandra <[hidden email]>wrote:

> Hi.,
>
> i am raghu here, can any one please tell me what is the widget-style ="" we
> will use
> for validating only alphanumeric non space.
>
>
> Thank you.
>
> - Raghu
>



--
*Thanks & Regards
SAURABH SINGH
**Software Engineer*
*Mechatronics Systems Pvt Ltd*
*BHOPAL (M.P.)*
Reply | Threaded
Open this post in threaded view
|

Re: Javascript style we have used for validating alphanumeric and spaces are not allowed

Himanil Gupta
Hi Raghu,

'widget-style' are used to apply css to the widget that the user will
interact with, for field. Instead you can use 'event' and 'action'
attributes to achieve the required functionality for field.
e.g.
1- <field name="yourFieldName" title="${uiLabelMap.yourTitle}"
event="defineEventType" action="javascript: function definition">
2- <field name="yourFieldName" title="${uiLabelMap.yourTitle}"
event="defineEventType" action="function already defined in JS file
which included in decorator screens">

event types like: 'onClick', 'onChange', 'onKeyPress'.

Thanks&  regards
--
Himanil Gupta
Enterprise Software Developer
HotWax Media Indore
http://www.hotwaxmedia.com/


On 07/11/2012 08:09 PM, SAURABH SINGH wrote:

> If you are using in the script .
> use thi function
>
> function alphanumeric(value,field){
>          var alphaExp = /^[0-9a-zA-Z]+$/;
>          var input = alphaExp.test(value);
>          if(value == "")
>          {
>              return true;
>          }
>          if(input == true)
>          {
>              return true;
>          }
>          else
>          {
>              alert(field);
>              return false;
>          }
>      }
>
> On Wed, Jul 11, 2012 at 4:26 PM, Raghu Chandra<[hidden email]>wrote:
>
>> Hi.,
>>
>> i am raghu here, can any one please tell me what is the widget-style ="" we
>> will use
>> for validating only alphanumeric non space.
>>
>>
>> Thank you.
>>
>> - Raghu
>>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Javascript style we have used for validating alphanumeric and spaces are not allowed

Ankit Jain-2
In reply to this post by Raghu Chandra
Please ask these questions on User Mailing List ([hidden email])

Regards,
Ankit Jain




On Wed, Jul 11, 2012 at 4:26 PM, Raghu Chandra <[hidden email]>wrote:

> Hi.,
>
> i am raghu here, can any one please tell me what is the widget-style ="" we
> will use
> for validating only alphanumeric non space.
>
>
> Thank you.
>
> - Raghu
>