Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - need a simple javascript function
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Topic Closedneed a simple javascript function

 Post Reply Post Reply Page  12>
Author
iSec View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 February 2005
Status: Offline
Points: 1140
Direct Link To This Post 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
Back to Top
123Simples View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 July 2007
Location: United Kingdom
Status: Offline
Points: 1192
Direct Link To This Post Posted: 18 March 2008 at 3:44pm
Do you mean like a

Form Input Validation JavaScript?

Back to Top
iSec View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 February 2005
Status: Offline
Points: 1140
Direct Link To This Post 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
Back to Top
123Simples View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 July 2007
Location: United Kingdom
Status: Offline
Points: 1192
Direct Link To This Post 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 LOL) but, google says:

http://msdn2.microsoft.com/en-us/library/a0z2h4sw(VS.71).aspx which might be what you want
Back to Top
iSec View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 February 2005
Status: Offline
Points: 1140
Direct Link To This Post 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
Back to Top
123Simples View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 July 2007
Location: United Kingdom
Status: Offline
Points: 1192
Direct Link To This Post 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?
Back to Top
123Simples View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 July 2007
Location: United Kingdom
Status: Offline
Points: 1192
Direct Link To This Post Posted: 18 March 2008 at 5:24pm
What is this for? Home shopping? Database enquiries? Or am I just completely out of my depth?
Back to Top
billd3 View Drop Down
Senior Member
Senior Member


Joined: 19 February 2003
Location: United States
Status: Offline
Points: 530
Direct Link To This Post 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
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.