Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Validating Specific Zip Codes

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #36410
    jcoder
    Member

    I have a project where I have to redirect people depending on what zip code that they put into the zip code field. There are1206 zip codes that if someone puts in they get redirected to another site. I really don’t want to have to do 1206 if statements. Anyone have any other solutions?

    Thanks,

    Justin

    #95732
    noahgelman
    Participant

    You dont have to use if statements, just make 1206 variables and use which ever matches what the user put in. Or if you have back end experience, create a database table with the info. Not really a quick way of doing this.

    #95752
    jcoder
    Member

    Would I be able to do something like this?











    Display Date


Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.