Web Analytics Made Easy -
StatCounter I need a little help with javascript - CodingForum


No announcement yet.

I need a little help with javascript

  • Filter
  • Time
  • Show
Clear All
new posts

  • I need a little help with javascript

    I am really new at this I am in school and can not figure out what I am missing can anyone give me a little bump start on this one.this is what it is suppose to be done.

    Change Request #1
    Requestor: Mike Simmons
    Modify the prototype form page to verify that all required information has been submitted. Customers should be required to provide their name and either their mailing address or their e-mail address. Use JavaScript to verify that all required fields have been filled. Prompt users for missing information. When all required fields have been filled, the user should be directed to the acknowledgment page.

    and the code i have so far is
    <form method="methodtype " action="scripturl"</form>
    <title>Kudler Fine Foods</title>
    <p><img src="Kudler.gif"</p>
    <form name="transaction"
    <font color="red">Last Name</font>
    <td class="right"> <input type="text" id="lastname"size="25" maxlength="30" /> </td>
    <font color="red">First Name</font>
    <td> <input type="text" id="firstname" size="25"maxlength="30" /> </td>
    <font color="red">Street Address</font>
    <td> <input type="text" id="address" size="25" /> </td>
    <font color="red">City</font>
    <td> <input type="text" id="city" size="25" /> </td>
    <font color="red">State</font>
    <form name="theForm"> <tt>
    <select name="aaa" size="1">
    <option selected value="/index.php">Alabama </option>
    <option selected value="/index.php">Alaska </option>
    <option selected value="/index.php">Arizona </option>
    <option selected value="/index.php">Arkansas </option>
    <option selected value="/index.php">California</option>
    <option selected value="/index.php">Colorado</option>
    <option selected value="/index.php">Connecticut</option>
    <option selected value="/index.php">Delawara</option>
    <option selected value="/index.php">Florida</option>
    <option selected value="/index.php">Georgia </option>
    <option selected value="/index.php">Hawaii </option>
    <option selected value="/index.php">Idaho</option>
    <option selected value="/index.php">Illinois </option>
    <option selected value="/index.php">Indiana </option>
    <option selected value="/index.php">Iowa</option>
    <option selected value="/index.php">Kansas</option>
    <option selected value="/index.php">Kentucky </option>
    <option selected value="/index.php">Louisiana </option>
    <option selected value="/index.php">Maine</option>
    <option selected value="/index.php">Maryland</option>
    <option selected value="/index.php">Massachusetts </option>
    <option selected value="/index.php">Michagan </option>
    <option selected value="/index.php">Minnesota</option>
    <option selected value="/index.php">Mississippi</option>
    <option selected value="/index.php">Missouri </option>
    <option selected value="/index.php">Montana</option>
    <option selected value="/index.php">Nebraska </option>
    <option selected value="/index.php">Nevada </option>
    <option selected value="/index.php">New Hampshire </option>
    <option selected value="/index.php">New Jersey </option>
    <option selected value="/index.php">New Mexico</option>
    <option selected value="/index.php">New York</option>
    <option selected value="/index.php">North Carolina</option>
    <option selected value="/index.php">North Dakota</option>
    <option selected value="/index.php">Ohio</option>
    <option selected value="/index.php">Oklahoma </option>
    <option selected value="/index.php">Oregon </option>
    <option selected value="/index.php">Pennsylvania</option>
    <option selected value="/index.php">Rhode Island </option>
    <option selected value="/index.php">South Carolina </option>
    <option selected value="/index.php">South Dakota</option>
    <option selected value="/index.php">Tennessee</option>
    <option selected value="/index.php">Texas </option>
    <option selected value="/index.php">Utah </option>
    <option selected value="/index.php">Vermont</option>
    <option selected value="/index.php">Virginia</option>
    <option selected value="/index.php">Washington </option>
    <option selected value="/index.php">West Virginia </option>
    <option selected value="/index.php">Wisconsin</option>
    <option selected value="/index.php">Wyoming</option>
    <font color="red">Zip</font>
    <td> <input type="text" id="zipcode" size="5" />
    <font color="red">-</font>
    <input type="text" id="plusfour" size="4" /> </td>

    <font color="red">Email Address</font>
    <td> <input type="text" id="Email Address" size="25"maxlength="30" /> </td>
    <font color="red">Phone Number</font>
    <td> <input type="text" id="phone" size="1" />
    <font color="red">-</font>
    <td> <input type="text" id="phone" size="2" />
    <font color="red">-</font>
    <td> <input type="text" id="phone" size="3" />



    <a href="ACK.html" onclick="window.open(this.href);return false;">Continue</a>
    <a href="Kudler Fine Foods.html" onclick="window.open(this.href);return false;">Cancel</a> <BR>

    <font color="red">
    Before submitting the form, please check for accuracy and to ensure that all fields are filled in as appropriate to your request, and as required.<BR>
    If you have problems in submitting this form, please report the to Kudler Fine Foods at (858) 555-0138.

    <style type ="text/css" media="all">
    button {
    color: Yellow;
    border: Pink outset thick;
    margin-right: .5em;
    text-align: center;
    font-weight: bold;
    font-size: 12pt;
    font-family: arial,helvetica,sans-serif; }

    <p><a href="#top">Back To Top<a/></p>


  • #2
    Mark, welcome to the forums. Please be sure to read the 'how to post a question' sticky thread at the top of the JavaScript forum. Make sure to read item #3.

    What exactly are we looking at here? Did you simply dump your entire homework assignment into the post? When you've worked on it a bit based on your lesson, please feel free to post back with a valid question and a relevant segment of code.


    • #3
      help with java question

      what i am trying to figure out is after I have this I need it to check and see if all fields are entered correctly.

      This is only a portion of the work there is four more things afet this portion


      • #4
        Originally posted by markwaterman View Post
        what i am trying to figure out is after I have this I need it to check and see if all fields are entered correctly.

        This is only a portion of the work there is four more things afet this portion
        help with java question

        This is the JavaScript forum. Java and Javascript are entirely different programming languages, in spite of the confusingly similar names.

        Do please read the posting guidelines regarding silly thread titles. The thread title is supposed to help people who have a similar problem in future. Yours is useless for this purpose.

        Wrapping your code in [code] tags means use the octothorpe or #symbol on the toolbar. The word CODE should be in upper case but of course if I wrote it like that here it would wrap this text in code tags.

        As bdl says, you cannot expect people to do your homework for you (nor is it in your longer-term interests that they should do so). The subject of form validation has been covered a zillion times in this forum. Use the search feature and then develop some code of your own - if you are still having problems please come back and I am sure that someone will offer you some guidance.
        Last edited by Philip M; Apr 6, 2009, 03:06 AM.

        All the code given in this post has been tested and is intended to address the question asked.
        Unless stated otherwise it is not just a demonstration.