| Author |
Topic Search Topic Options
|
iSec
Senior Member
Joined: 13 February 2005
Status: Offline
Points: 1140
|
Topic: need a simple javascript function Posted: 17 March 2008 at 8:17pm |
Can someone provide me with a function (using javascript) on how to check against a list of items...
example:
A user enters a specific value, the script will check against a list of items, if the specified value matches with any of the items in the list then the returned message would be: Welcome
If it does not match with the list, the returned value would be: rejected
Any help is appreciated.
|
|
"When it gets dark enough, you can see the stars"
-Charles A. Beard
|
 |
123Simples
Senior Member
Joined: 08 July 2007
Location: United Kingdom
Status: Offline
Points: 1192
|
Posted: 18 March 2008 at 3:44pm |
|
Do you mean like a
Form Input Validation JavaScript?
|
|
|
 |
iSec
Senior Member
Joined: 13 February 2005
Status: Offline
Points: 1140
|
Posted: 18 March 2008 at 4:27pm |
Yes but not a generic one,.... not like the one that would check to see if as a field was populated with values...
what i'm looking for is a validation script that checks against a list of items as i mentioned above, and depending on the input it will provide different feedback, or direct to a specific page based on the feedback.
|
|
"When it gets dark enough, you can see the stars"
-Charles A. Beard
|
 |
123Simples
Senior Member
Joined: 08 July 2007
Location: United Kingdom
Status: Offline
Points: 1192
|
Posted: 18 March 2008 at 4:46pm |
Well I may be on the wrong path here because all my knowledge is self taught (you only have to look at my websites to see that  ) but, google says: http://msdn2.microsoft.com/en-us/library/a0z2h4sw(VS.71).aspx which might be what you want
|
|
|
 |
iSec
Senior Member
Joined: 13 February 2005
Status: Offline
Points: 1140
|
Posted: 18 March 2008 at 5:05pm |
|
That's done in .NET; I need a client-side code (javascript) for this.
|
|
"When it gets dark enough, you can see the stars"
-Charles A. Beard
|
 |
123Simples
Senior Member
Joined: 08 July 2007
Location: United Kingdom
Status: Offline
Points: 1192
|
Posted: 18 March 2008 at 5:21pm |
|
Sorry Info....... See what I mean? I'd assume though that you would need a database to compare the scripts inputs though, or is not the case?
|
|
|
 |
123Simples
Senior Member
Joined: 08 July 2007
Location: United Kingdom
Status: Offline
Points: 1192
|
Posted: 18 March 2008 at 5:24pm |
|
What is this for? Home shopping? Database enquiries? Or am I just completely out of my depth?
|
|
|
 |
billd3
Senior Member
Joined: 19 February 2003
Location: United States
Status: Offline
Points: 530
|
Posted: 20 March 2008 at 6:52pm |
|
How many items? Many or just a few? Will this list change or remain static?
|
|
BillD
http://theamcpages.com
http://theamcforum.com
|
 |