Jump to content

Needing simple javascript


Method
 Share

Recommended Posts

I am looking for a simple script that alerts the user of any empty fields on a contact page I am developing. I am not sure how close I am to getting this right, I have been staring at it for a long time. Any help would be great Here is the .html file

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml11.dtd">
<!--Page providing information on how to contact Quality Solutions -->
<html xmlns="http://www.w3.org/1999/xhtml">
   <head>
      <title>Quality Solutions Contact Us</title>
      <script type = "text/javascript" src = "contact1.js">
      <!--

      // -->
      </script>

   </head>
   <body>
   <img src = "qs.jpg" width = "100%" " height = "90" alt = Quality Solutions banner />
   <h1 text align = center>Contact Us</h1>

   <p text align = center>    Our goal at Quality Solutions is to provide you with exceptional,<br/>
           outstanding customer service. If you have any questions, suggestions,<br/>
           comments or issues with your experience here, please tell us.</p> <br/>

           <hr/>

           <html>
<body>

<fieldset>

<legend>
Contact Information:
</legend>

<form action="">
<p>First Name: <input type="text" id = "FirstName" size="14"> Last Name: <input type="text" id = "LastName" size="15"></p>

<p>Address: <input type="text" id = "address1" size="50"></p>

<p>              <input type="text" size="50"></p>

<p>City:        <input type="text" id= "City" size="50"></p>

State:         <select name="state">

<option value="">--Select a State--</option>

            <option value="AL">Alabama</option>
            <option value="AK">Alaska</option>
            <option value="AZ">Arizona</option>
            <option value="AR">Arkansas</option>
            <option value="CA">California</option>
            <option value="CO">Colorado</option>

            <option value="CT">Connecticut</option>
            <option value="DE">Delaware</option>
            <option value="DC">District of Columbia</option>
            <option value="FL">Florida</option>
            <option value="GA">Georgia</option>
            <option value="HI">Hawaii</option>

            <option value="ID">Idaho</option>
            <option value="IL">Illinois</option>
            <option value="IN">Indiana</option>
            <option value="IA">Iowa</option>
            <option value="KS">Kansas</option>
            <option value="KY">Kentucky</option>

            <option value="LA">Louisiana</option>
            <option value="ME">Maine</option>
            <option value="MD">Maryland</option>
            <option value="MA">Massachusetts</option>
            <option value="MI">Michigan</option>
            <option value="MN">Minnesota</option>

            <option value="MS">Mississippi</option>
            <option value="MO">Missouri</option>
            <option value="MT">Montana</option>
            <option value="NE">Nebraska</option>
            <option value="NV">Nevada</option>
            <option value="NH">New Hampshire</option>

            <option value="NJ">New Jersey</option>
            <option value="NM">New Mexico</option>
            <option value="NY">New York</option>
            <option value="NC">North Carolina</option>
            <option value="ND">North Dakota</option>
            <option value="OH">Ohio</option>

            <option value="OK">Oklahoma</option>
            <option value="OR">Oregon</option>
            <option value="PA">Pennsylvania</option>
            <option value="RI">Rhode Island</option>
            <option value="SC">South Carolina</option>
            <option value="SD">South Dakota</option>

            <option value="TN">Tennessee</option>
            <option value="TX">Texas</option>
            <option value="UT">Utah</option>
            <option value="VT">Vermont</option>
            <option value="VA">Virginia</option>
            <option value="WA">Washington</option>

            <option value="WV">West Virginia</option>
            <option value="WI">Wisconsin</option>
            <option value="WY">Wyoming</option>
            <option value="MP">Northern Mariana Islands</option>
            <option value="GU">Guam</option>
            <option value="VI">Virgin Islands</option>

            <option value="AS">American Samoa</option>
            <option value="PR">Puerto Rico</option>
            </select>
              Zip Code:  <input type="text" size="7"><br />
            <p>Phone #: <input type = "text" size="50"></p>
            <p>Email:     <input type = "text" size="50"></p>

            <input type="submit" value="Submit" />


</form>
</fieldset>

           <p text align = Center>Quality Solutions.<br />
        7034 Nowhere Road<br />
        Indianapolis, IN 41803-5100<br />
        Phone: (800) 782-5429 or (317) 229-4545<br />

        Fax: (317) 232-4876</p>
        <p text align = center> Information@qualitysolutions.com</P>
        <p text align = center>
        <a href="qualityhome.html">Home</a> </p>
        <hr />

   </body>
</html>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...