www.webdeveloper.com
Results 1 to 2 of 2

Thread: Java script help without using a data base

  1. #1
    Join Date
    Apr 2013
    Posts
    4

    Unhappy Java script help without using a data base

    Hi there,
    I am completely new to the world of web design, and I am trying to learn some basic functions I need to incorporate into an html section on this online website builder.

    I basically want to create a form where a user can enter their zip and be re-directed to a "regional page". I would hope that if a user entered any of the ~7 of the regional zip codes in the field they would be redirected to that regions page. I have already created about 15+ regional pages, and would like stay away from using any databases.

    <html>
    <head>
    <script type="text/javascript">

    function newDoc()
    {
    var codes = [ 12345, 23456,45678, 12346, 09876]
    window.location.assign("(mywepage/regionsection1)")
    }
    </script>

    </head>
    <body>
    <center>
    <form method="post" action="javascript: goTo();">
    <div>
    <input id="pageNumber" type="text" value="Enter Your Zip Code"
    </head>
    <input type="submit" value="Go" onclick="newDoc()">
    </div>
    </form>
    </body>


    Am I ball parking it at all? Please forgive any redundancy I been on w3school all day trying to learn, and this is what I have.

    Any help would be greatly appreciated!

  2. #2
    Join Date
    May 2006
    Location
    Somewhere behind your screen
    Posts
    1,633
    xxx: Guess Buddhist riddle: "What is the sound of one hand clapping?"
    yyy: facepalm

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles