User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 374,011 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,783 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 1164 | Replies: 3
Reply
Join Date: Dec 2004
Posts: 24
Reputation: dello is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
dello dello is offline Offline
Newbie Poster

Javascript Input Mask / Validation

  #1  
May 16th, 2008
Hi all,

I was wondering if somebody could help me...

I have a form field which I want to lock down so users can only enter a specific combination

eg. first character is a letter - can be either B,C,W,F,A,H which is followed by seven numbers.

I have got some script which only accepts numbers but I do not know enough about javascript so that I can amend it to accept the leading character.

Thanking you all in advance
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2004
Posts: 24
Reputation: dello is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
dello dello is offline Offline
Newbie Poster

Re: Javascript Input Mask / Validation

  #2  
May 20th, 2008
please?
Reply With Quote  
Join Date: May 2008
Location: Nant-y-moel, South Wales
Posts: 9
Reputation: ajberrow is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
ajberrow's Avatar
ajberrow ajberrow is offline Offline
Newbie Poster

Re: Javascript Input Mask / Validation

  #3  
May 20th, 2008
This may help :

http://ginger-space.blogspot.com/200...alidation.html

Amend and expand the code that's in there checking which character you're on and using an ASCII chart to find the codes for the letters you want to allow in position 1. You could also check for the lower-case values and convert to the upper-case values, if you wanted to.

Anthony
Reply With Quote  
Join Date: May 2008
Posts: 45
Reputation: ardeezstyle is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 1
ardeezstyle ardeezstyle is offline Offline
Light Poster

Re: Javascript Input Mask / Validation

  #4  
May 23rd, 2008

Hi! If am known which are the exact letters that should be allowed to be entered in the Input Text field, Then only I can try to find a solution of the same.


Regards

Rupam Datta

Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb JavaScript / DHTML / AJAX Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 10:49 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC