Field Validation Will Not Work

Field Validation Will Not Work

I'm new to jquery mobile. My form works but none of the fields need to be filled in even though I have javascript validation.  Here is the javascript part. I have it in my header. I believe I'm using jquery 1.3 I tried upgrading to the latest version and it really jacked up everything. I'm too far along to switch now.

  1. <script>
  2. $(document).on( "pageinit", function() {
  3. $('#checkpay checkform').validate({
  4.      rules: {
  5.         dcs1: {
  6.             required: true
  7.         },
  8.         dcs2: {
  9.             required: true
  10.         },
  11.         ckresp: {
  12.             required: true
  13.         },
  14. ckphone: {
  15. required: false
  16. },
  17. ckemail: {
  18.             required: true
  19.         },
  20. ckname: {
  21.             required: true
  22.         },
  23. addr1: {
  24.             required: true
  25.         },
  26. addr2: {
  27. required: false
  28. },
  29. ckcity: {
  30.             required: true
  31.         },
  32. state: {
  33.             required: false
  34.         },
  35. ckzip: {
  36.             required: true
  37.         },
  38. routing: {
  39.             required: true
  40.         },
  41. account1: {
  42.             required: true
  43.         },
  44. account2: {
  45.             required: true
  46.         },
  47. pmtamount: {
  48.             required: true
  49.         },
  50. comment: {
  51. required: false
  52. }
  53.     },
  54.     messages: {
  55.         dcs1: {
  56.             required: "Please enter DCS#."
  57.         },
  58.         dcs2: {
  59.             required: "Please enter DCS#."
  60.         },
  61.         ckresp: {
  62.             required: "Please enter Responsible Party."
  63.         },
  64. ckemail: {
  65.             required: "Please enter your email."
  66.         },
  67. ckname: {
  68.             required: "Please enter  name on check."
  69.         },
  70. addr1: {
  71.             required: "Please enter address."
  72.         },
  73. ckcity: {
  74.             required: "Please enter city."
  75.         },
  76. state: {
  77.             required: "Please enter state."
  78.         },
  79. ckzip: {
  80.             required: "Please enter zip code."
  81.         },
  82. routing: {
  83.             required: "Please enter your routing #."
  84.         },
  85. account1: {
  86.             required: "Please enter your account #."
  87.         },
  88. account2: {
  89.             required: "Please enter account # again."
  90.         },
  91. pmtamount: {
  92. required: "Please enter payment amount."
  93. }
  94.    
  95.     },
  96. errorPlacement: function (error, element) {
  97.         error.insertAfter(element.parent());
  98.     }
  99. });
  100. });

  101. </script>
After I upload the page and check it with my phone, the page just times out and never loads.
Here is my form code.

It does the same with both GET and POST

  1. <form id="checkform" action="parse_check.php" method="GET" >
  2.   <label for="dcs1">DCS#:</label>
  3.   <input type="text" name="dcs1" id="dcs1" data-mini="true" minlength="7" maxlength="9"  />
  4.     
  5.   <label for="dcs2">Confirm DCS#:</label>
  6.   <input type="text" name="dcs2" id="dcs2" data-mini="true" minlength="7" maxlength="9" />
  7.   
  8.   <label for="ckresp">Responsible Party</label>
  9.   <input type="text" name="ckresp" id="ckresp" data-mini="true" />
  10.   
  11.   <label for="ckemail">Enter Email</label>
  12.   <input type="email" name="ckemail" id="ckemail" data-mini="true" />
  13.   
  14.   <label for="ckphone">Phone Number (optional)</label>
  15.   <input type="tel" name="ckphone" id="ckphone" data-mini="true" />
  16.   
  17.   <p align="center"><b>Checking Account Information</b></p>
  18.   <label for="ckname">Name On Check</label>
  19.   <input type="text" name="ckname" id="ckname" data-mini="true" />
  20.   
  21.   <label for="addr1">Address</label>
  22.   <input type="text" name="addr1" id="addr1" data-mini="true" />
  23.   
  24.   <label for="addr2">Suite/Apt</label>
  25.   <input type="text" name="addr2" id="addr2" data-mini="true"/>
  26.   
  27.   <label for="ckcity">City</label>
  28.   <input type="text" name="ckcity" id="ckcity" data-mini="true" />
  29.   
  30.   <label for"state">State</label>
  31.   <select name="state" size="1" id="state" data-mini="true" >
  32.   <option value="AL">Alabama</option>
  33.   <option value="AK">Alaska</option>
  34.   <option value="AZ">Arizona</option>
  35.   <option value="AR">Arkansas</option>
  36.   <option value="CA">California</option>
  37.   <option value="CO">Colorado</option>
  38.   <option value="CT">Connecticut</option>
  39.   <option value="DE">Delaware</option>
  40.   <option value="DC">Dist of Columbia</option>
  41.   <option value="FL">Florida</option>
  42.   <option value="GA">Georgia</option>
  43.   <option value="HI">Hawaii</option>
  44.   <option value="ID">Idaho</option>
  45.   <option value="IL">Illinois</option>
  46.   <option value="IN">Indiana</option>
  47.   <option value="IA">Iowa</option>
  48.   <option value="KS">Kansas</option>
  49.   <option value="KY">Kentucky</option>
  50.   <option value="LA">Louisiana</option>
  51.   <option value="ME">Maine</option>
  52.   <option value="MD">Maryland</option>
  53.   <option value="MA">Massachusetts</option>
  54.   <option value="MI">Michigan</option>
  55.   <option value="MN">Minnesota</option>
  56.   <option value="MS">Mississippi</option>
  57.   <option value="MO">Missouri</option>
  58.   <option value="MT">Montana</option>
  59.   <option value="NE">Nebraska</option>
  60.   <option value="NV">Nevada</option>
  61.   <option value="NH">New Hampshire</option>
  62.   <option value="NJ">New Jersey</option>
  63.   <option value="NM">New Mexico</option>
  64.   <option value="NY">New York</option>
  65.   <option value="NC">North Carolina</option>
  66.   <option value="ND">North Dakota</option>
  67.   <option value="OH">Ohio</option>
  68.   <option value="OK">Oklahoma</option>
  69.   <option value="OR">Oregon</option>
  70.   <option value="PA">Pennsylvania</option>
  71.   <option value="RI">Rhode Island</option>
  72.   <option value="SC">South Carolina</option>
  73.   <option value="SD">South Dakota</option>
  74.   <option value="TN">Tennessee</option>
  75.   <option value="TX">Texas</option>
  76.   <option value="UT">Utah</option>
  77.   <option value="VT">Vermont</option>
  78.   <option value="VA">Virginia</option>
  79.   <option value="WA">Washington</option>
  80.   <option value="WV">West Virginia</option>
  81.   <option value="WI">Wisconsin</option>
  82.   <option value="WY">Wyoming</option>
  83. </select>
  84.   
  85.   <label for="ckzip">Zip Code</label>  <input name="ckzip" type="number"  id="ckzip" maxlength="9" data-mini="true" minlength="5"/>
  86.   
  87.    <label for="routing">Routing Number</label>
  88.   <input type="number" name="routing" id="routing" data-mini="true"  minlength="5"/>
  89.   
  90.   <label for="account1">Account Number</label>
  91.   <input type="number" name="account1" id="account1" data-mini="true" />
  92.   
  93.   <label for="account2">Re-Enter Account Number</label>
  94.   <input type="number" name="account2" id="account2" data-mini="true" />
  95.   
  96.   <label for="pmtamount">Payment Amount</label>
  97.   <input type="number" name="pmtamount" id="pmtamount" data-mini="true" />
  98.   
  99.   <div data-role="fieldcontain">
  100.     <fieldset data-role="controlgroup" data-type="horizontal" data-mini="true">
  101.       <legend>Payment Frequency</legend>
  102.       <input type="radio" name="ckfreq" id="ckfreq_0" value="" />
  103.       <label for="ckfreq_0">One Time Payment</label>
  104.       <input type="radio" name="ckfreq" id="ckfreq_1" value="" />
  105.       <label for="ckfreq_1">Draft Weekly</label>
  106.       <input type="radio" name="ckfreq" id="ckfreq_2" value="" />
  107.       <label for="ckfreq_2">Draft Monthly</label>
  108.     </fieldset>
  109.   </div>
  110.   <div data-role="fieldcontain">
  111.     <label for="comments">Comments:</label>
  112.     <textarea cols="40" rows="8" name="comments" id="comments" data-mini="true"></textarea>
  113.   </div>
  114. <input type="submit" value="Submit Button" /><input type="reset" value="Reset Button" />
  115.   </form>
If I don't use the javascript the form works fine and I receive the information via email from my php page.

Any help is appreciated.