for specific characters in the first few fields.
I was wondering if anyone can point me in the right direction as I’m beginning to lose the will to live ;-)
What I want to do is to use a JS to see if a website visitor is eligible for a particular service dependant on part of their postcode / zip - ie the first general part on the code. For example if they type L15****, or L16**** or L18**** (where the asterisk could be anything) and hit a submit button it pops up the alert box with a message saying "Yes eligible" (or displays a message on screen) but any other code returns "No sorry not eligible" - eg L19**** it returns nope.
I’ve looked at all sorts of validation checks but my programming skills are limited and I can’t hack anything or find a similar example anywhere. I’m guessing the eligible postcodes need to go in an array but I can’t figure it out. It needs to be Javascript rather than PHP as my it can only be client-side.
Any ideas people?
Thanks, David